diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-03 15:39:14 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-11-03 15:39:14 -0300 |
commit | fa075b79530af1cbc977349f2e467d69ce01202c (patch) | |
tree | 300e10cd086a9812331b954d46552dbf420b0a8a /testes/errors.lua | |
parent | 08a077d673b25cf1fbfe21794f240f4ff4999667 (diff) | |
parent | 7923dbbf72da303ca1cca17efd24725668992f15 (diff) | |
download | lua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.gz lua-fa075b79530af1cbc977349f2e467d69ce01202c.tar.bz2 lua-fa075b79530af1cbc977349f2e467d69ce01202c.zip |
Merge branch 'master' into newarray
Diffstat (limited to 'testes/errors.lua')
-rw-r--r-- | testes/errors.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index bf6f389d..01cfe906 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
@@ -121,6 +121,9 @@ assert(not string.find(doit"aaa={13}; local bbbb=1; aaa[bbbb](3)", "'bbbb'")) | |||
121 | checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number") | 121 | checkmessage("aaa={13}; local bbbb=1; aaa[bbbb](3)", "number") |
122 | checkmessage("aaa=(1)..{}", "a table value") | 122 | checkmessage("aaa=(1)..{}", "a table value") |
123 | 123 | ||
124 | -- bug in 5.4.6 | ||
125 | checkmessage("a = {_ENV = {}}; print(a._ENV.x + 1)", "field 'x'") | ||
126 | |||
124 | _G.aaa, _G.bbbb = nil | 127 | _G.aaa, _G.bbbb = nil |
125 | 128 | ||
126 | -- calls | 129 | -- calls |
@@ -392,19 +395,19 @@ lineerror("a\n=\n-\n\nprint\n;", 3) | |||
392 | 395 | ||
393 | lineerror([[ | 396 | lineerror([[ |
394 | a | 397 | a |
395 | ( | 398 | ( -- << |
396 | 23) | 399 | 23) |
397 | ]], 1) | 400 | ]], 2) |
398 | 401 | ||
399 | lineerror([[ | 402 | lineerror([[ |
400 | local a = {x = 13} | 403 | local a = {x = 13} |
401 | a | 404 | a |
402 | . | 405 | . |
403 | x | 406 | x |
404 | ( | 407 | ( -- << |
405 | 23 | 408 | 23 |
406 | ) | 409 | ) |
407 | ]], 2) | 410 | ]], 5) |
408 | 411 | ||
409 | lineerror([[ | 412 | lineerror([[ |
410 | local a = {x = 13} | 413 | local a = {x = 13} |