diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-04-27 11:03:30 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2023-04-27 11:03:30 -0300 |
commit | 97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125 (patch) | |
tree | 3ec0442b2f1ce9f3a081da5cf14f281b2d2811d5 /test.lua | |
parent | 012cf9c86cf91cb8354e229bde335592d41b84b2 (diff) | |
download | lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.tar.gz lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.tar.bz2 lpeg-97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125.zip |
New macros 'fillset' and 'clearset'
Diffstat (limited to 'test.lua')
-rwxr-xr-x | test.lua | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) | ||
1230 | end | 1236 | end |
1231 | 1237 | ||
1232 | 1238 | ||