summaryrefslogtreecommitdiff
path: root/tests/indent/common.lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2022-02-04 23:36:36 +0100
committerStephan Seitz <stephan.seitz@fau.de>2022-02-05 18:54:55 +0100
commitb9069a81b9c42c4d6d1ee4ebc4cd5feb35aa590d (patch)
tree881f031b7e9486048a8fed056542ee26b45c0ad4 /tests/indent/common.lua
parentca06ff0a61bc521f8ad3a2a280ba2e6f1b10f4c8 (diff)
tests: only compare indents not contents in indent tests
Diffstat (limited to 'tests/indent/common.lua')
-rw-r--r--tests/indent/common.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/indent/common.lua b/tests/indent/common.lua
index 054ffaac..c9f91214 100644
--- a/tests/indent/common.lua
+++ b/tests/indent/common.lua
@@ -14,7 +14,7 @@ local function same_indent(state, arguments)
local ok = true
local errors = { before = {}, after = {} }
for line = 1, #before do
- if before[line] ~= after[line] then
+ if #string.match(before[line], "^%s*") ~= #string.match(after[line], "^%s*") then
if before[line] and after[line] then
-- store the actual indentation length for each line
errors.before[line] = #string.match(before[line], "^%s*")