diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-13 11:43:10 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-13 11:43:10 -0300 |
| commit | 3b9dd52be02fd43c598f4adb6fa7844e6a573923 (patch) | |
| tree | 8f858942f5db0e3d9d7cad503b59ee1541a60aa6 /testes/code.lua | |
| parent | 7dc6aae29057c9dc4588f780c7abd72a62ff4c8e (diff) | |
| download | lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.tar.gz lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.tar.bz2 lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.zip | |
Collective declaration for globals ('global *')
Diffstat (limited to '')
| -rw-r--r-- | testes/code.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testes/code.lua b/testes/code.lua index 111717ce..b6ceb34c 100644 --- a/testes/code.lua +++ b/testes/code.lua | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | -- $Id: testes/code.lua $ | 1 | -- $Id: testes/code.lua $ |
| 2 | -- See Copyright Notice in file lua.h | 2 | -- See Copyright Notice in file lua.h |
| 3 | 3 | ||
| 4 | global * <const> | ||
| 5 | |||
| 4 | if T==nil then | 6 | if T==nil then |
| 5 | (Message or print)('\n >>> testC not active: skipping opcode tests <<<\n') | 7 | (Message or print)('\n >>> testC not active: skipping opcode tests <<<\n') |
| 6 | return | 8 | return |
| @@ -405,8 +407,8 @@ do -- tests for table access in upvalues | |||
| 405 | end | 407 | end |
| 406 | 408 | ||
| 407 | -- de morgan | 409 | -- de morgan |
| 408 | checkequal(function () local a; if not (a or b) then b=a end end, | 410 | checkequal(function () local a, b; if not (a or b) then b=a end end, |
| 409 | function () local a; if (not a and not b) then b=a end end) | 411 | function () local a, b; if (not a and not b) then b=a end end) |
| 410 | 412 | ||
| 411 | checkequal(function (l) local a; return 0 <= a and a <= l end, | 413 | checkequal(function (l) local a; return 0 <= a and a <= l end, |
| 412 | function (l) local a; return not (not(a >= 0) or not(a <= l)) end) | 414 | function (l) local a; return not (not(a >= 0) or not(a <= l)) end) |
