diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-08-17 10:42:56 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-08-17 10:42:56 -0300 |
| commit | f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2 (patch) | |
| tree | 3b8e1055f91a369de67e6b3b690a2c349c9541a1 /testes/db.lua | |
| parent | 1b3f507f620d996ffb69da7476a19251acfb89ca (diff) | |
| download | lua-f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2.tar.gz lua-f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2.tar.bz2 lua-f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2.zip | |
More control over encoding of test files
The few UTF-8 test files are commented as such, and there is only one
non UTF-8 test file (to test non UTF-8 sources).
Diffstat (limited to 'testes/db.lua')
| -rw-r--r-- | testes/db.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testes/db.lua b/testes/db.lua index 67b58934..d3758c41 100644 --- a/testes/db.lua +++ b/testes/db.lua | |||
| @@ -345,7 +345,7 @@ function f(a,b) | |||
| 345 | local _, y = debug.getlocal(1, 2) | 345 | local _, y = debug.getlocal(1, 2) |
| 346 | assert(x == a and y == b) | 346 | assert(x == a and y == b) |
| 347 | assert(debug.setlocal(2, 3, "pera") == "AA".."AA") | 347 | assert(debug.setlocal(2, 3, "pera") == "AA".."AA") |
| 348 | assert(debug.setlocal(2, 4, "maçã") == "B") | 348 | assert(debug.setlocal(2, 4, "manga") == "B") |
| 349 | x = debug.getinfo(2) | 349 | x = debug.getinfo(2) |
| 350 | assert(x.func == g and x.what == "Lua" and x.name == 'g' and | 350 | assert(x.func == g and x.what == "Lua" and x.name == 'g' and |
| 351 | x.nups == 2 and string.find(x.source, "^@.*db%.lua$")) | 351 | x.nups == 2 and string.find(x.source, "^@.*db%.lua$")) |
| @@ -373,9 +373,9 @@ function g (...) | |||
| 373 | local arg = {...} | 373 | local arg = {...} |
| 374 | do local a,b,c; a=math.sin(40); end | 374 | do local a,b,c; a=math.sin(40); end |
| 375 | local feijao | 375 | local feijao |
| 376 | local AAAA,B = "xuxu", "mamão" | 376 | local AAAA,B = "xuxu", "abacate" |
| 377 | f(AAAA,B) | 377 | f(AAAA,B) |
| 378 | assert(AAAA == "pera" and B == "maçã") | 378 | assert(AAAA == "pera" and B == "manga") |
| 379 | do | 379 | do |
| 380 | local B = 13 | 380 | local B = 13 |
| 381 | local x,y = debug.getlocal(1,5) | 381 | local x,y = debug.getlocal(1,5) |
