aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-05 14:31:07 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-05 14:31:07 -0300
commit30982bec968fd34694b5be3ecbbc92de78d8eacb (patch)
tree9b2b350be7c79b7237e8ffbe84dc90c6c7cc5089 /testes
parent1ab3208a1fceb12fca8f24ba57d6e13c5bff15e3 (diff)
downloadlua-30982bec968fd34694b5be3ecbbc92de78d8eacb.tar.gz
lua-30982bec968fd34694b5be3ecbbc92de78d8eacb.tar.bz2
lua-30982bec968fd34694b5be3ecbbc92de78d8eacb.zip
Bug: Bad stack manipulation in 'multiline' (REPL)
'incomplete' was popping error message that should be used in case there is no more lines to complete the input, that is, 'pushline' returns NULL, due to end of file.
Diffstat (limited to 'testes')
-rw-r--r--testes/main.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/testes/main.lua b/testes/main.lua
index 11b14b44..cec4fa04 100644
--- a/testes/main.lua
+++ b/testes/main.lua
@@ -349,6 +349,11 @@ prepfile("a = [[b\nc\nd\ne]]\n=a")
349RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out) 349RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
350checkprogout("b\nc\nd\ne\n\n") 350checkprogout("b\nc\nd\ne\n\n")
351 351
352-- input interrupted in continuation line
353prepfile("a.\n")
354RUN([[lua -i < %s > /dev/null 2> %s]], prog, out)
355checkprogout("near <eof>\n")
356
352local prompt = "alo" 357local prompt = "alo"
353prepfile[[ -- 358prepfile[[ --
354a = 2 359a = 2