aboutsummaryrefslogtreecommitdiff
path: root/test.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-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