diff options
Diffstat (limited to 'testes')
| -rw-r--r-- | testes/locals.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testes/locals.lua b/testes/locals.lua index e59ab95a..7834d7da 100644 --- a/testes/locals.lua +++ b/testes/locals.lua | |||
| @@ -276,6 +276,15 @@ do -- errors in __close | |||
| 276 | assert(msg == 1) | 276 | assert(msg == 1) |
| 277 | assert(log[1] == 4 and log[2] == 3 and log[3] == 2 and log[4] == 2 | 277 | assert(log[1] == 4 and log[2] == 3 and log[3] == 2 and log[4] == 2 |
| 278 | and #log == 4) | 278 | and #log == 4) |
| 279 | |||
| 280 | -- error in toclose in vararg function | ||
| 281 | function foo (...) | ||
| 282 | local <toclose> x123 = 10 | ||
| 283 | end | ||
| 284 | |||
| 285 | local st, msg = pcall(foo) | ||
| 286 | assert(string.find(msg, "'x123'")) | ||
| 287 | |||
| 279 | end | 288 | end |
| 280 | 289 | ||
| 281 | 290 | ||
