summaryrefslogtreecommitdiff
path: root/tests/linescanner.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/linescanner.lua')
-rw-r--r--tests/linescanner.lua24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/linescanner.lua b/tests/linescanner.lua
index f726fbd..a96a9a6 100644
--- a/tests/linescanner.lua
+++ b/tests/linescanner.lua
@@ -48,7 +48,7 @@ test [[
local stuff = function (x) return x end +
local thing = stuff({ +
b = { name = 'bob', ?
- }, +
+ }, ?
-- comment -
}) ?
print("test2") +
@@ -58,7 +58,7 @@ test [[
local stuff = function (x) return x end +
local thing = stuff({ +
b = { name = 'bob', ?
- }, +
+ }, ?
-- comment -
} ?
) ?
@@ -267,4 +267,24 @@ local t = { +
} ?
]=]
+-- Hanging table endings.
+test [[
+local v = f({ +
+ a = "foo", ?
+ x = y +
+}, ?
+function(g) ?
+ g() +
+end) -
+]]
+
+test [[
+local v = f({ +
+ a = "foo", ?
+ x = y +
+}, function(g) ?
+ g() +
+end) -
+]]
+
print(("%d LineScanner tests passed."):format(ntests))