summaryrefslogtreecommitdiff
path: root/lib/regex/test/unicode.myr
blob: 5916a1c564f0d109bf5b4b4d2a980f755fdf40f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 [][:])
}