aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorSaid Al Attrach <alattrach.said@yahoo.com>2019-03-30 18:14:20 +0100
committerSaid Al Attrach <alattrach.said@yahoo.com>2019-03-30 18:14:20 +0100
commit2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b (patch)
tree6ba61785950dc655ad3c6ec05907eeb5b85d5d3a /test/helpers.lua
parenta9df3fa5d2ee41b165b1e740fe27eddbf9dbf4a5 (diff)
downloadrneovim-2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b.tar.gz
rneovim-2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b.tar.bz2
rneovim-2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b.zip
test: move trim to global helpers
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index e4c3019adc..3a766b99f5 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -731,6 +731,10 @@ local function read_nvim_log()
return log
end
+local function trim(s)
+ return s:match('^%s*(.*%S)') or ''
+end
+
local module = {
REMOVE_THIS = REMOVE_THIS,
argss_to_cmd = argss_to_cmd,
@@ -772,6 +776,7 @@ local module = {
updated = updated,
which = which,
write_file = write_file,
+ trim = trim,
}
return module