summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'AbuseFilter/tests/parserTests/get-matches.t')
-rw-r--r--AbuseFilter/tests/parserTests/get-matches.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/AbuseFilter/tests/parserTests/get-matches.t b/AbuseFilter/tests/parserTests/get-matches.t
index 88e163b4..45c4ac85 100644
--- a/AbuseFilter/tests/parserTests/get-matches.t
+++ b/AbuseFilter/tests/parserTests/get-matches.t
@@ -1,4 +1,5 @@
-/* More complete tests for get_matches are in AbuseFilterParserTest.php */
-a := get_matches('I am a (dog|cat)', 'What did you say?');
+get_matches('I am a (dog|cat)', 'What did you say?') === [ false, false ] &
get_matches('The (truth|pineapple) is (?:rarely)? pure and (nee*v(ah|er) sh?imple)', 'The truth is rarely pure and never simple, Wilde said') == ['The truth is rarely pure and never simple', 'truth', 'never simple', 'er'] &
-a === [false, false] \ No newline at end of file
+get_matches('You say (.*) \(and I say (.*)\)\.', 'You say hello (and I say goodbye).') === [ 'You say hello (and I say goodbye).', 'hello', 'goodbye' ] &
+get_matches('I(?: am)? the ((walrus|egg man).*)\!', 'I am the egg man, I am the walrus !') === [ 'I am the egg man, I am the walrus !', 'egg man, I am the walrus ', 'egg man' ] &
+get_matches('this (does) not match', 'foo bar') === [ false, false ] \ No newline at end of file