From 012cf9c86cf91cb8354e229bde335592d41b84b2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy <roberto@inf.puc-rio.br> Date: Thu, 27 Apr 2023 10:32:39 -0300 Subject: Compact charsets used in trees, too. --- test.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test.lua') diff --git a/test.lua b/test.lua index d76e3f1..9f8d226 100755 --- a/test.lua +++ b/test.lua @@ -68,6 +68,8 @@ assert(m.match(#m.P(true) * "a", "a") == 2) assert(m.match("a" * #m.P(false), "a") == nil) assert(m.match("a" * #m.P(true), "a") == 2) +assert(m.match(m.P(1)^0, "abcd") == 5) +assert(m.match(m.S("")^0, "abcd") == 1) -- tests for locale do @@ -1167,7 +1169,7 @@ end -- bug in 1.0: problems with math-times returning too many captures -do +if _VERSION >= "Lua 5.2" then local lim = 2^11 - 10 local res = {m.match(manyCmt(lim), "a")} assert(#res == lim and res[1] == lim - 1 and res[lim] == 0) -- cgit v1.2.3-55-g6feb