1 files changed, 6 insertions, 0 deletions
diff --git a/test/line-numbers.cratera b/test/line-numbers.cratera
index f2f977b..75bc09b 100644
--- a/test/line-numbers.cratera
+++ b/test/line-numbers.cratera
@@ -25,6 +25,9 @@ Test.
Test.
]]
error("test failed")
+ elseif key == "h" then
+ error [[
+test failed]]
end
end
@@ -42,4 +45,7 @@ local ok, msg = pcall(mkerror,"f")
assert(not ok and msg:match(":21"), msg)
local ok, msg = pcall(mkerror,"g")
assert(not ok and msg:match(":27"), msg)
+local ok, msg = pcall(mkerror,"h")
+-- on lua 5.1, cratera line numbers align with the end of the string
+assert(not ok and (msg:match(":29") or msg:match(":30")), msg)
print("line number tests pass")
|