Skip to content

Commit 82ca57d

Browse files
authored
bugfix
fixed bug with cache table redefining after expected_msg call
1 parent 0a3b94c commit 82ca57d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

check.lua

+5-4
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,16 @@ end
8585

8686
local function expected_msg(variants, found)
8787

88+
local expected = {}
8889
for i = 1, #variants do
89-
variants[i] = string_gsub(variants[i], ".+:", "")
90+
expected[i] = string_gsub(variants[i], ".+:", "")
9091
end
91-
variants = table_concat(variants, "\\")
92+
expected = table_concat(expected, "\\")
9293
found = string_gsub(found, ".+:", "")
9394

9495
return string_format(
9596
"%s expected, got %s",
96-
variants, found
97+
expected, found
9798
)
9899
end
99100

@@ -177,4 +178,4 @@ function scheck(pattern)
177178
if not success then return warn(msg, 3) and false end
178179

179180
return true
180-
end
181+
end

0 commit comments

Comments
 (0)