shithub: mc

ref: 41046c6382017e0297f8e07a7493c2cd779b8f0b
dir: /lib/regex/test/search.myr/

View raw version
use std

use "testmatch"

const main = {
	var s : byte[:]
		
	s = std.strjoin([
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
		"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
	][:], "")
	testsearch("bc", "Abcd", `std.Some [][:])
	testsearch("Abc", "Abc", `std.Some [][:])
	testsearch("(bc)", "Abc", `std.Some ["bc"][:])
	testsearch("(bc.*)", "Abcde", `std.Some ["bcde"][:])
	testsearch("(b.*c)", "ABbasdfcrap", `std.Some ["basdfc"][:])
}