From 30982bec968fd34694b5be3ecbbc92de78d8eacb Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 5 Jul 2024 14:31:07 -0300 Subject: 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. --- testes/main.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testes') 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") 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 \n") + local prompt = "alo" prepfile[[ -- a = 2 -- cgit v1.2.3-55-g6feb