aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
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