aboutsummaryrefslogtreecommitdiff
path: root/testes
diff options
context:
space:
mode:
Diffstat (limited to 'testes')
-rw-r--r--testes/errors.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/testes/errors.lua b/testes/errors.lua
index adc111fd..5fdb7722 100644
--- a/testes/errors.lua
+++ b/testes/errors.lua
@@ -46,7 +46,7 @@ end
46assert(doit("error('hi', 0)") == 'hi') 46assert(doit("error('hi', 0)") == 'hi')
47 47
48-- test nil error message 48-- test nil error message
49assert(doit("error()") == nil) 49assert(doit("error()") == "<error object is nil>")
50 50
51 51
52-- test common errors/errors that crashed in the past 52-- test common errors/errors that crashed in the past
@@ -614,7 +614,7 @@ do
614 assert(not res and msg == t) 614 assert(not res and msg == t)
615 615
616 res, msg = pcall(function () error(nil) end) 616 res, msg = pcall(function () error(nil) end)
617 assert(not res and msg == nil) 617 assert(not res and msg == "<error object is nil>")
618 618
619 local function f() error{msg='x'} end 619 local function f() error{msg='x'} end
620 res, msg = xpcall(f, function (r) return {msg=r.msg..'y'} end) 620 res, msg = xpcall(f, function (r) return {msg=r.msg..'y'} end)
@@ -634,7 +634,7 @@ do
634 assert(not res and msg == t) 634 assert(not res and msg == t)
635 635
636 res, msg = pcall(assert, nil, nil) 636 res, msg = pcall(assert, nil, nil)
637 assert(not res and msg == nil) 637 assert(not res and type(msg) == "string")
638 638
639 -- 'assert' without arguments 639 -- 'assert' without arguments
640 res, msg = pcall(assert) 640 res, msg = pcall(assert)