summaryrefslogtreecommitdiff
path: root/libregex/test/boundaries.myr
diff options
context:
space:
mode:
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 */
-}