diff options
Diffstat (limited to 'testes')
| -rw-r--r-- | testes/main.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/testes/main.lua b/testes/main.lua index 5c7d0a10..9a86fb5a 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
| @@ -368,20 +368,18 @@ assert(string.find(t, prompt .. ".*" .. prompt .. ".*" .. prompt)) | |||
| 368 | 368 | ||
| 369 | 369 | ||
| 370 | -- non-string prompt | 370 | -- non-string prompt |
| 371 | prompt = | 371 | prompt = [[ |
| 372 | "local C = 0;\z | 372 | local C = 'X'; |
| 373 | _PROMPT=setmetatable({},{__tostring = function () \z | 373 | _PROMPT=setmetatable({},{__tostring = function () |
| 374 | C = C + 1; return C end})" | 374 | C = C .. 'X'; return C end}) |
| 375 | ]] | ||
| 375 | prepfile[[ -- | 376 | prepfile[[ -- |
| 376 | a = 2 | 377 | a = 2 |
| 377 | ]] | 378 | ]] |
| 378 | RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out) | 379 | RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out) |
| 379 | local t = getoutput() | 380 | local t = getoutput() |
| 380 | assert(string.find(t, [[ | 381 | -- skip version line and then check the presence of the three prompts |
| 381 | 1 -- | 382 | assert(string.find(t, "^.-\nXX[^\nX]*\n?XXX[^\nX]*\n?XXXX\n?$")) |
| 382 | 2a = 2 | ||
| 383 | 3 | ||
| 384 | ]], 1, true)) | ||
| 385 | 383 | ||
| 386 | 384 | ||
| 387 | -- test for error objects | 385 | -- test for error objects |
