diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/calls.lua | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/testes/calls.lua b/testes/calls.lua index 941493b1..56a12ae6 100644 --- a/testes/calls.lua +++ b/testes/calls.lua | |||
@@ -21,21 +21,6 @@ assert(type(f) == 'function') | |||
21 | assert(not pcall(type)) | 21 | assert(not pcall(type)) |
22 | 22 | ||
23 | 23 | ||
24 | do -- test error in 'print' too... | ||
25 | local tostring = _ENV.tostring | ||
26 | |||
27 | _ENV.tostring = nil | ||
28 | local st, msg = pcall(print, 1) | ||
29 | assert(st == false and string.find(msg, "attempt to call a nil value")) | ||
30 | |||
31 | _ENV.tostring = function () return {} end | ||
32 | local st, msg = pcall(print, 1) | ||
33 | assert(st == false and string.find(msg, "must return a string")) | ||
34 | |||
35 | _ENV.tostring = tostring | ||
36 | end | ||
37 | |||
38 | |||
39 | -- testing local-function recursion | 24 | -- testing local-function recursion |
40 | fact = false | 25 | fact = false |
41 | do | 26 | do |