[lldb/Lua] Recognize "quit" as a way to exit the script interpreter.
authorJonas Devlieghere <jonas@devlieghere.com>
Sun, 21 Jun 2020 07:31:46 +0000 (00:31 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 22 Jun 2020 16:27:12 +0000 (09:27 -0700)
commit1728dec255a5336303b301e26ec22eca2000b593
treecfc51505e60bb722a592e4145a18ebaefdd48ba0
parent9934cc544cae4e4fa969657387f5251e42206e1a
[lldb/Lua] Recognize "quit" as a way to exit the script interpreter.

Add a way to quit the interactive script interpreter from a shell tests.
Currently, the only way (that I know) to exit the interactive Lua
interpreter is to send a EOF with CTRL-D. I noticed that the embedded
Python script interpreter accepts quit (while the regular python
interpreter doesn't). I've added a special case to the Lua interpreter
to do the same.

Differential revision: https://reviews.llvm.org/D82272
lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
lldb/test/Shell/ScriptInterpreter/Lua/quit.test [new file with mode: 0644]