summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2024-06-19 23:45:21 -0300
committerSoniEx2 <endermoneymod@gmail.com>2024-06-19 23:48:38 -0300
commit4908297e3293c0ce1f5c207e8d10d09f1599b4c4 (patch)
treedc5096849b2e05bcc7e238368aacdaadc7ea7824 /test
parent13ba6740870d99749f0341b5a38e1e9213162647 (diff)
Add more line number tests HEAD default
Diffstat (limited to 'test')
-rw-r--r--test/line-numbers.cratera6
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")