From 2bf18e7843542dd4ba3bfaa3b09078401bfb6b7b Mon Sep 17 00:00:00 2001 From: Said Al Attrach Date: Sat, 30 Mar 2019 18:14:20 +0100 Subject: test: move trim to global helpers --- test/helpers.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/helpers.lua') 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 -- cgit