aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorKillTheMule <KillTheMule@users.noreply.github.com>2016-05-10 22:52:44 +0200
committerJustin M. Keyes <justinkz@gmail.com>2016-05-10 06:59:45 -0400
commit48b2faead8488e102f6d731f9d793aafc58dc537 (patch)
tree5a51c259de58b4d9873f87ab80a0407fe45dcaea /test/functional/helpers.lua
parenta524200ca706d77b1519759225f73f684280b466 (diff)
downloadrneovim-48b2faead8488e102f6d731f9d793aafc58dc537.tar.gz
rneovim-48b2faead8488e102f6d731f9d793aafc58dc537.tar.bz2
rneovim-48b2faead8488e102f6d731f9d793aafc58dc537.zip
test/functional/helpers.lua: Fix dedent() #4735
The character class %s also matches a newline in lua, that's not really what we want here. It works in the other cases in this function, so I left them, but the final gsub should preserve newlines.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 6ccadda72d..37b7bf664c 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -176,7 +176,7 @@ local function dedent(str)
return str
end
-- create a pattern for the indent
- indent = indent:gsub('%s', '%%s')
+ indent = indent:gsub('%s', '[ \t]')
-- strip it from the first line
str = str:gsub('^'..indent, '')
-- strip it from the remaining lines