diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/errors.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/testes/errors.lua b/testes/errors.lua index 01cfe906..80d91a92 100644 --- a/testes/errors.lua +++ b/testes/errors.lua | |||
@@ -91,7 +91,7 @@ end | |||
91 | 91 | ||
92 | if not T then | 92 | if not T then |
93 | (Message or print) | 93 | (Message or print) |
94 | ('\n >>> testC not active: skipping memory message test <<<\n') | 94 | ('\n >>> testC not active: skipping tests for messages in C <<<\n') |
95 | else | 95 | else |
96 | print "testing memory error message" | 96 | print "testing memory error message" |
97 | local a = {} | 97 | local a = {} |
@@ -104,6 +104,19 @@ else | |||
104 | end) | 104 | end) |
105 | T.totalmem(0) | 105 | T.totalmem(0) |
106 | assert(not st and msg == "not enough" .. " memory") | 106 | assert(not st and msg == "not enough" .. " memory") |
107 | |||
108 | -- stack space for luaL_traceback (bug in 5.4.6) | ||
109 | local res = T.testC[[ | ||
110 | # push 16 elements on the stack | ||
111 | pushnum 1; pushnum 1; pushnum 1; pushnum 1; pushnum 1; | ||
112 | pushnum 1; pushnum 1; pushnum 1; pushnum 1; pushnum 1; | ||
113 | pushnum 1; pushnum 1; pushnum 1; pushnum 1; pushnum 1; | ||
114 | pushnum 1; | ||
115 | # traceback should work with 4 remaining slots | ||
116 | traceback xuxu 1; | ||
117 | return 1 | ||
118 | ]] | ||
119 | assert(string.find(res, "xuxu.-main chunk")) | ||
107 | end | 120 | end |
108 | 121 | ||
109 | 122 | ||