diff options
Diffstat (limited to 'testes/main.lua')
| -rw-r--r-- | testes/main.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/testes/main.lua b/testes/main.lua index 5d2652cb..de14a088 100644 --- a/testes/main.lua +++ b/testes/main.lua | |||
| @@ -221,8 +221,11 @@ assert(string.find(getoutput(), "error calling 'print'")) | |||
| 221 | RUN('echo "io.stderr:write(1000)\ncont" | lua -e "require\'debug\'.debug()" 2> %s', out) | 221 | RUN('echo "io.stderr:write(1000)\ncont" | lua -e "require\'debug\'.debug()" 2> %s', out) |
| 222 | checkout("lua_debug> 1000lua_debug> ") | 222 | checkout("lua_debug> 1000lua_debug> ") |
| 223 | 223 | ||
| 224 | -- test warnings | 224 | |
| 225 | RUN('echo "io.stderr:write(1); warn[[XXX]]" | lua -q 2> %s', out) | 225 | print("testing warnings") |
| 226 | |||
| 227 | -- no warnings by default | ||
| 228 | RUN('echo "io.stderr:write(1); warn[[XXX]]" | lua 2> %s', out) | ||
| 226 | checkout("1") | 229 | checkout("1") |
| 227 | 230 | ||
| 228 | prepfile[[ | 231 | prepfile[[ |
| @@ -236,7 +239,7 @@ warn("", "@on") -- again, no control, real warning | |||
| 236 | warn("@on") -- keep it "started" | 239 | warn("@on") -- keep it "started" |
| 237 | warn("Z", "Z", "Z") -- common warning | 240 | warn("Z", "Z", "Z") -- common warning |
| 238 | ]] | 241 | ]] |
| 239 | RUN('lua %s 2> %s', prog, out) | 242 | RUN('lua -W %s 2> %s', prog, out) |
| 240 | checkout[[ | 243 | checkout[[ |
| 241 | Lua warning: @offXXX@off | 244 | Lua warning: @offXXX@off |
| 242 | Lua warning: @on | 245 | Lua warning: @on |
| @@ -250,7 +253,7 @@ warn("@allow") | |||
| 250 | u1 = setmetatable({}, {__gc = function () error("XYZ") end}) | 253 | u1 = setmetatable({}, {__gc = function () error("XYZ") end}) |
| 251 | u2 = setmetatable({}, {__gc = function () error("ZYX") end}) | 254 | u2 = setmetatable({}, {__gc = function () error("ZYX") end}) |
| 252 | ]] | 255 | ]] |
| 253 | RUN('lua %s 2> %s', prog, out) | 256 | RUN('lua -W %s 2> %s', prog, out) |
| 254 | checkprogout("ZYX)\nXYZ)\n") | 257 | checkprogout("ZYX)\nXYZ)\n") |
| 255 | 258 | ||
| 256 | 259 | ||
