summaryrefslogtreecommitdiff
path: root/lib/regex/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/regex/test')
-rw-r--r--lib/regex/test/basic.myr10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/regex/test/basic.myr b/lib/regex/test/basic.myr
index 35109c9..506b7c0 100644
--- a/lib/regex/test/basic.myr
+++ b/lib/regex/test/basic.myr
@@ -19,21 +19,29 @@ const main = {
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
][:], "")
+ std.put("hi\n")
testmatch(".*bc", "Abc", `std.Some [][:])
- testmatch("(a*)*", "a", `std.Some ["a"][:])
+ std.put("1\n")
+ dbgmatch("(a*)*", "a", `std.Some ["a"][:])
+ std.put("2\n")
testmatch("(aa|aab?)*", s, `std.Some ["aa"][:])
+ std.put("3\n")
/* greedy matches */
testmatch("(<.*>).*", "<a foo> blah <bar>", `std.Some [
"<a foo> blah <bar>",
][:])
+ std.put("3\n")
testmatch("(<.+>).*", "<a foo> blah <bar>", `std.Some [
"<a foo> blah <bar>",
][:])
+ std.put("4\n")
/* reluctant matches */
testmatch("(<.*?>).*", "<a foo> blah <bar>", `std.Some [
"<a foo>",
][:])
+ std.put("5\n")
testmatch("(<.+?>).*", "<a foo> blah <bar>", `std.Some [
"<a foo>",
][:])
+ std.put("6\n")
}