diff options
Diffstat (limited to 'test.lua')
-rwxr-xr-x | test.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -424,6 +424,16 @@ do | |||
424 | end | 424 | end |
425 | 425 | ||
426 | 426 | ||
427 | do | ||
428 | -- nesting of captures too deep | ||
429 | local p = m.C(1) | ||
430 | for i = 1, 300 do | ||
431 | p = m.Ct(p) | ||
432 | end | ||
433 | checkerr("too deep", p.match, p, "x") | ||
434 | end | ||
435 | |||
436 | |||
427 | -- tests for non-pattern as arguments to pattern functions | 437 | -- tests for non-pattern as arguments to pattern functions |
428 | 438 | ||
429 | p = { ('a' * m.V(1))^-1 } * m.P'b' * { 'a' * m.V(2); m.V(1)^-1 } | 439 | p = { ('a' * m.V(1))^-1 } * m.P'b' * { 'a' * m.V(2); m.V(1)^-1 } |