aboutsummaryrefslogtreecommitdiff
path: root/testes/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/main.lua')
-rw-r--r--testes/main.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/testes/main.lua b/testes/main.lua
index cec4fa04..ff408f13 100644
--- a/testes/main.lua
+++ b/testes/main.lua
@@ -90,7 +90,7 @@ prepfile[[
901, a 901, a
91) 91)
92]] 92]]
93RUN('lua - < %s > %s', prog, out) 93RUN('lua - -- < %s > %s', prog, out)
94checkout("1\tnil\n") 94checkout("1\tnil\n")
95 95
96RUN('echo "print(10)\nprint(2)\n" | lua > %s', out) 96RUN('echo "print(10)\nprint(2)\n" | lua > %s', out)
@@ -133,7 +133,7 @@ checkout("-h\n")
133prepfile("print(package.path)") 133prepfile("print(package.path)")
134 134
135-- test LUA_PATH 135-- test LUA_PATH
136RUN('env LUA_INIT= LUA_PATH=x lua %s > %s', prog, out) 136RUN('env LUA_INIT= LUA_PATH=x lua -- %s > %s', prog, out)
137checkout("x\n") 137checkout("x\n")
138 138
139-- test LUA_PATH_version 139-- test LUA_PATH_version
@@ -346,7 +346,7 @@ RUN([[lua -e"_PROMPT='' _PROMPT2=''" -i < %s > %s]], prog, out)
346checkprogout("6\n10\n10\n\n") 346checkprogout("6\n10\n10\n\n")
347 347
348prepfile("a = [[b\nc\nd\ne]]\n=a") 348prepfile("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 352-- input interrupted in continuation line
@@ -478,12 +478,14 @@ assert(not os.remove(out))
478-- invalid options 478-- invalid options
479NoRun("unrecognized option '-h'", "lua -h") 479NoRun("unrecognized option '-h'", "lua -h")
480NoRun("unrecognized option '---'", "lua ---") 480NoRun("unrecognized option '---'", "lua ---")
481NoRun("unrecognized option '-Ex'", "lua -Ex") 481NoRun("unrecognized option '-Ex'", "lua -Ex --")
482NoRun("unrecognized option '-vv'", "lua -vv") 482NoRun("unrecognized option '-vv'", "lua -vv")
483NoRun("unrecognized option '-iv'", "lua -iv") 483NoRun("unrecognized option '-iv'", "lua -iv")
484NoRun("'-e' needs argument", "lua -e") 484NoRun("'-e' needs argument", "lua -e")
485NoRun("syntax error", "lua -e a") 485NoRun("syntax error", "lua -e a")
486NoRun("'-l' needs argument", "lua -l") 486NoRun("'-l' needs argument", "lua -l")
487NoRun("-i", "lua -- -i") -- handles -i as a script name
488
487 489
488 490
489if T then -- test library? 491if T then -- test library?