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.
This commit is contained in:
Roberto Ierusalimschy
2024-07-05 14:31:07 -03:00
parent 1ab3208a1f
commit 30982bec96
2 changed files with 10 additions and 6 deletions

View File

@@ -349,6 +349,11 @@ prepfile("a = [[b\nc\nd\ne]]\n=a")
RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
checkprogout("b\nc\nd\ne\n\n")
-- input interrupted in continuation line
prepfile("a.\n")
RUN([[lua -i < %s > /dev/null 2> %s]], prog, out)
checkprogout("near <eof>\n")
local prompt = "alo"
prepfile[[ --
a = 2