shithub: mc

ref: 0f3f41fae775b2647cd0cdaf0a9ef395c19b9878
dir: /lib/regex/test/unicode.myr/

View raw version
use std
use regex

use "testmatch"

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 [][:])
}