mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
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:
parent
1ab3208a1f
commit
30982bec96
2 changed files with 10 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue