summaryrefslogtreecommitdiff
path: root/libregex/test/boundaries.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/boundaries.myr
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'libregex/test/boundaries.myr')
-rw-r--r--libregex/test/boundaries.myr36
1 files changed, 0 insertions, 36 deletions
diff --git a/libregex/test/boundaries.myr b/libregex/test/boundaries.myr
deleted file mode 100644
index 196d197..0000000
--- a/libregex/test/boundaries.myr
+++ /dev/null
@@ -1,36 +0,0 @@
-use std
-use "testmatch.use"
-
-const main = {
- /* expected matches */
- testmatch("\\<([a-z]*)\\>", "abcdef", `std.Some [
- "abcdef",
- ][:])
- testmatch(".*(\\<.*\\>).*", "!m!", `std.Some [ /* single char word in midstring */
- "m",
- ][:])
- testmatch(".*(\\<.*\\>).*", "!m", `std.Some [ /* single char word at end of string */
- "m",
- ][:])
- testmatch(".*(\\<.*\\>).*", "m!", `std.Some [ /* single char word at start of string */
- "m",
- ][:])
- testmatch(".*(\\<.*\\>).*", "!@#!!matches!!%!", `std.Some [ /* word in midstring */
- "matches",
- ][:])
- testmatch(".*(\\<.*\\>).*", "matches!!%!", `std.Some [ /* word at start of string */
- "matches",
- ][:])
- testmatch(".*(\\<.*\\>).*", "!@#!!matches", `std.Some [ /* word at end of string */
- "matches",
- ][:])
- testmatch(".*(\\<.*\\>).*", "!@#!!matches!!%!foo", `std.Some [ /* matches last word in string */
- "foo",
- ][:])
- testmatch(".*(\\<.*\\>).*", "123", `std.Some [ /* numbers are also word bounds */
- "123",
- ][:])
-
- /* nonmatches */
- testmatch("\\<([a-z]*)\\>foo", "abcdefoo", `std.None) /* word boundary needed in midstring */
-}