summaryrefslogtreecommitdiff
path: root/test/catch.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/catch.lua')
-rw-r--r--test/catch.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/catch.lua b/test/catch.lua
index 849be09d..01aac665 100644
--- a/test/catch.lua
+++ b/test/catch.lua
@@ -41,6 +41,10 @@ return function (script, seps)
local result = {}
local marks = {}
+ for s in seps:gmatch '.' do
+ result[s] = catchedTable()
+ end
+
local lineOffset = 1
local line = 0
local skipOffset = 0
@@ -68,9 +72,6 @@ return function (script, seps)
local mark = marks[j]
if mark.char == text then
local position = line * 10000 + offset - skipOffset - lineOffset
- if not result[text] then
- result[text] = catchedTable()
- end
result[text][#result[text]+1] = { mark.position, position }
table.remove(marks, j)
break