aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-04 17:11:58 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-04 17:11:58 -0300
commit366c85564874d560b3608349f752e9e490f9002d (patch)
tree77426f1c700cf4c7aa15b0742cf6669c9166af7a /testes
parent781219dbe16fc327f5b828e1ff6fa45ec3265cba (diff)
downloadlua-366c85564874d560b3608349f752e9e490f9002d.tar.gz
lua-366c85564874d560b3608349f752e9e490f9002d.tar.bz2
lua-366c85564874d560b3608349f752e9e490f9002d.zip
lua.c loads 'readline' dynamically
(See comments in luaconf.h.) This change allows easier compilation, as Lua compiles and works even if the package 'readline' is absent from the system. Moreover, non-interactive uses don't load the library, making the stand-alone slightly faster for small loads.
Diffstat (limited to 'testes')
-rw-r--r--testes/main.lua16
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
371prompt = 371prompt = [[
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]]
375prepfile[[ -- 376prepfile[[ --
376a = 2 377a = 2
377]] 378]]
378RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out) 379RUN([[lua -e "%s" -i < %s > %s]], prompt, prog, out)
379local t = getoutput() 380local t = getoutput()
380assert(string.find(t, [[ 381-- skip version line and then check the presence of the three prompts
3811 -- 382assert(string.find(t, "^.-\nXX[^\nX]*\n?XXX[^\nX]*\n?XXXX\n?$"))
3822a = 2
3833
384]], 1, true))
385 383
386 384
387-- test for error objects 385-- test for error objects