summaryrefslogtreecommitdiff
path: root/libregex/test/basic.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
commit2bc852bda98762d3bc01548bf972e3f1b137fbfb (patch)
tree74831deed3c9057c5fe0cbb8790d220e855bc792 /libregex/test/basic.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
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>",
- ][:])
-}