summaryrefslogtreecommitdiff
path: root/libregex/test/basic.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-06-15 02:02:23 -0700
committerOri Bernstein <ori@eigenstate.org>2015-06-15 02:02:23 -0700
commit49ea47caf3cb37e0fe667d3ed833d12d670bae68 (patch)
tree2e4e9104e0597f3f2a8b95558363db9fc23a9722 /libregex/test/basic.myr
parentc2a04cf2cb447ffb3c24d91e7978ef170460bf46 (diff)
downloadmc-49ea47caf3cb37e0fe667d3ed833d12d670bae68.tar.gz
Update libregex tests to run in mbld.
Drop the hacky shell.
Diffstat (limited to 'libregex/test/basic.myr')
-rw-r--r--libregex/test/basic.myr22
1 files changed, 15 insertions, 7 deletions
diff --git a/libregex/test/basic.myr b/libregex/test/basic.myr
index 92816fa..168b547 100644
--- a/libregex/test/basic.myr
+++ b/libregex/test/basic.myr
@@ -19,13 +19,21 @@ const main = {
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
][:], "")
- testmatch(".*bc", "Abc")
- testmatch("(a*)*", "a")
- testmatch("(aa|aab?)*", s)
+ testmatch(".*bc", "Abc", `std.Some [][:])
+ testmatch("(a*)*", "a", `std.Some ["a"][:])
+ testmatch("(aa|aab?)*", s, `std.Some ["aa"][:])
/* greedy matches */
- testmatch("(<.*>).*", "<a foo> blah <bar>")
- testmatch("(<.+>).*", "<a foo> blah <bar>")
+ testmatch("(<.*>).*", "<a foo> blah <bar>", `std.Some [
+ "<a foo> blah <bar>",
+ ][:])
+ testmatch("(<.+>).*", "<a foo> blah <bar>", `std.Some [
+ "<a foo> blah <bar>",
+ ][:])
/* reluctant matches */
- testmatch("(<.*?>).*", "<a foo> blah <bar>")
- testmatch("(<.+?>).*", "<a foo> blah <bar>")
+ testmatch("(<.*?>).*", "<a foo> blah <bar>", `std.Some [
+ "<a foo>",
+ ][:])
+ testmatch("(<.+?>).*", "<a foo> blah <bar>", `std.Some [
+ "<a foo>",
+ ][:])
}