diff options
Diffstat (limited to 'testes/goto.lua')
| -rw-r--r-- | testes/goto.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testes/goto.lua b/testes/goto.lua index 3f1f6e69..44486e20 100644 --- a/testes/goto.lua +++ b/testes/goto.lua | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | -- $Id: testes/goto.lua $ | 1 | -- $Id: testes/goto.lua $ |
| 2 | -- See Copyright Notice in file lua.h | 2 | -- See Copyright Notice in file lua.h |
| 3 | 3 | ||
| 4 | global require | 4 | global<const> require |
| 5 | global print, load, assert, string, setmetatable | 5 | global<const> print, load, assert, string, setmetatable |
| 6 | global collectgarbage, error | 6 | global<const> collectgarbage, error |
| 7 | 7 | ||
| 8 | print("testing goto and global declarations") | 8 | print("testing goto and global declarations") |
| 9 | 9 | ||
| @@ -304,7 +304,7 @@ do | |||
| 304 | 304 | ||
| 305 | -- global variables cannot be to-be-closed | 305 | -- global variables cannot be to-be-closed |
| 306 | checkerr("global X<close>", "cannot be") | 306 | checkerr("global X<close>", "cannot be") |
| 307 | checkerr("global * <close>", "cannot be") | 307 | checkerr("global <close> *", "cannot be") |
| 308 | 308 | ||
| 309 | do | 309 | do |
| 310 | local X = 10 | 310 | local X = 10 |
| @@ -345,7 +345,7 @@ do | |||
| 345 | end | 345 | end |
| 346 | 346 | ||
| 347 | checkerr([[ | 347 | checkerr([[ |
| 348 | global foo <const>; | 348 | global<const> foo; |
| 349 | function foo (x) return end -- ERROR: foo is read-only | 349 | function foo (x) return end -- ERROR: foo is read-only |
| 350 | ]], "assign to const variable 'foo'") | 350 | ]], "assign to const variable 'foo'") |
| 351 | 351 | ||
| @@ -357,7 +357,7 @@ do | |||
| 357 | ]], "%:2%:") -- correct line in error message | 357 | ]], "%:2%:") -- correct line in error message |
| 358 | 358 | ||
| 359 | checkerr([[ | 359 | checkerr([[ |
| 360 | global * <const>; | 360 | global<const> *; |
| 361 | print(X) -- Ok to use | 361 | print(X) -- Ok to use |
| 362 | Y = 1 -- ERROR | 362 | Y = 1 -- ERROR |
| 363 | ]], "assign to const variable 'Y'") | 363 | ]], "assign to const variable 'Y'") |
