diff options
Diffstat (limited to 'lib/regex/test/unicode.myr')
-rw-r--r-- | lib/regex/test/unicode.myr | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/regex/test/unicode.myr b/lib/regex/test/unicode.myr new file mode 100644 index 0000000..5916a1c --- /dev/null +++ b/lib/regex/test/unicode.myr @@ -0,0 +1,19 @@ +use std +use regex + +use "testmatch.use" + +const main = { + testmatch(".*bæc", "Abæc", `std.Some [][:]) + testmatch("(\\p{L}*)bæc\\P{L}*", \ + "Aabæc%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", \ + `std.Some ["Aa"][:]) + /* test various syntaxen */ + testmatch("(\\pL*)bæc\\PL*", \ + "Aabæc%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", \ + `std.Some ["Aa"][:]) + testmatch("(\\p{Letter}*)bæc\\P{Uppercase_Letter}*", \ + "Aabæc%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", \ + `std.Some ["Aa"][:]) + testmatch(".", "æ", `std.Some [][:]) +} |