diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2024-06-19 23:45:21 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2024-06-19 23:48:38 -0300 |
commit | 4908297e3293c0ce1f5c207e8d10d09f1599b4c4 (patch) | |
tree | dc5096849b2e05bcc7e238368aacdaadc7ea7824 /test/line-numbers.cratera | |
parent | 13ba6740870d99749f0341b5a38e1e9213162647 (diff) |
Diffstat (limited to 'test/line-numbers.cratera')
-rw-r--r-- | test/line-numbers.cratera | 6 |
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") |