From 97a4ca3b4078f581cdc8cebc4fa4cf39d5ff8125 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 27 Apr 2023 11:03:30 -0300 Subject: New macros 'fillset' and 'clearset' --- test.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test.lua') 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 t[5] == "cjk: " .. cjk and t[6] == "other: —" and t[7] == "ascii: " .. ascii and t[8] == "other: " .. last and t[9] == nil) + + -- failing UTF-8 matches and borders + assert(not m.match(m.utfR(10, 0x2000), "\9")) + assert(not m.match(m.utfR(10, 0x2000), "\226\128\129")) + assert(m.match(m.utfR(10, 0x2000), "\10") == 2) + assert(m.match(m.utfR(10, 0x2000), "\226\128\128") == 4) end -- cgit v1.2.3-55-g6feb