aboutsummaryrefslogtreecommitdiff
path: root/test.lua
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-04-27 11:03:30 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-04-27 11:03:30 -0300
commit97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125 (patch)
tree3ec0442b2f1ce9f3a081da5cf14f281b2d2811d5 /test.lua
parent012cf9c86cf91cb8354e229bde335592d41b84b2 (diff)
downloadlpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.tar.gz
lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.tar.bz2
lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.zip
New macros 'fillset' and 'clearset'
Diffstat (limited to 'test.lua')
-rwxr-xr-xtest.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test.lua b/test.lua
index 9f8d226..d31a69f 100755
--- a/test.lua
+++ b/test.lua
@@ -1227,6 +1227,12 @@ do -- a few typical UTF-8 ranges
1227 t[5] == "cjk: " .. cjk and t[6] == "other: —" and 1227 t[5] == "cjk: " .. cjk and t[6] == "other: —" and
1228 t[7] == "ascii: " .. ascii and t[8] == "other: " .. last and 1228 t[7] == "ascii: " .. ascii and t[8] == "other: " .. last and
1229 t[9] == nil) 1229 t[9] == nil)
1230
1231 -- failing UTF-8 matches and borders
1232 assert(not m.match(m.utfR(10, 0x2000), "\9"))
1233 assert(not m.match(m.utfR(10, 0x2000), "\226\128\129"))
1234 assert(m.match(m.utfR(10, 0x2000), "\10") == 2)
1235 assert(m.match(m.utfR(10, 0x2000), "\226\128\128") == 4)
1230end 1236end
1231 1237
1232 1238