diff options
Diffstat (limited to 'test.lua')
-rwxr-xr-x | test.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -68,6 +68,8 @@ assert(m.match(#m.P(true) * "a", "a") == 2) | |||
68 | assert(m.match("a" * #m.P(false), "a") == nil) | 68 | assert(m.match("a" * #m.P(false), "a") == nil) |
69 | assert(m.match("a" * #m.P(true), "a") == 2) | 69 | assert(m.match("a" * #m.P(true), "a") == 2) |
70 | 70 | ||
71 | assert(m.match(m.P(1)^0, "abcd") == 5) | ||
72 | assert(m.match(m.S("")^0, "abcd") == 1) | ||
71 | 73 | ||
72 | -- tests for locale | 74 | -- tests for locale |
73 | do | 75 | do |
@@ -1167,7 +1169,7 @@ end | |||
1167 | 1169 | ||
1168 | 1170 | ||
1169 | -- bug in 1.0: problems with math-times returning too many captures | 1171 | -- bug in 1.0: problems with math-times returning too many captures |
1170 | do | 1172 | if _VERSION >= "Lua 5.2" then |
1171 | local lim = 2^11 - 10 | 1173 | local lim = 2^11 - 10 |
1172 | local res = {m.match(manyCmt(lim), "a")} | 1174 | local res = {m.match(manyCmt(lim), "a")} |
1173 | assert(#res == lim and res[1] == lim - 1 and res[lim] == 0) | 1175 | assert(#res == lim and res[1] == lim - 1 and res[lim] == 0) |