summaryrefslogtreecommitdiff
path: root/libregex/test/basic.myr
diff options
context:
space:
mode:
Diffstat (limited to 'libregex/test/basic.myr')
-rw-r--r--libregex/test/basic.myr39
1 files changed, 0 insertions, 39 deletions
diff --git a/libregex/test/basic.myr b/libregex/test/basic.myr
deleted file mode 100644
index 168b547..0000000
--- a/libregex/test/basic.myr
+++ /dev/null
@@ -1,39 +0,0 @@
-use std
-
-use "testmatch.use"
-
-const main = {
- var s : byte[:]
-
- s = std.strjoin([
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
- ][:], "")
- 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>", `std.Some [
- "<a foo> blah <bar>",
- ][:])
- testmatch("(<.+>).*", "<a foo> blah <bar>", `std.Some [
- "<a foo> blah <bar>",
- ][:])
- /* reluctant matches */
- testmatch("(<.*?>).*", "<a foo> blah <bar>", `std.Some [
- "<a foo>",
- ][:])
- testmatch("(<.+?>).*", "<a foo> blah <bar>", `std.Some [
- "<a foo>",
- ][:])
-}