diff --git a/apache2/t/op/beginsWith.t b/apache2/t/op/beginsWith.t index 128f25a2..831c00b0 100644 --- a/apache2/t/op/beginsWith.t +++ b/apache2/t/op/beginsWith.t @@ -4,7 +4,7 @@ name => "beginsWith", param => "", input => "", - ret => 0, + ret => 1, }, { type => "op", @@ -18,7 +18,7 @@ name => "beginsWith", param => "", input => "TestCase", - ret => 0, + ret => 1, }, ### General diff --git a/apache2/t/op/endsWith.t b/apache2/t/op/endsWith.t index 8728c752..d1b37629 100644 --- a/apache2/t/op/endsWith.t +++ b/apache2/t/op/endsWith.t @@ -4,7 +4,7 @@ name => "endsWith", param => "", input => "", - ret => 0, + ret => 1, }, { type => "op", @@ -18,7 +18,7 @@ name => "endsWith", param => "", input => "TestCase", - ret => 0, + ret => 1, }, ### General diff --git a/apache2/t/op/rx.t b/apache2/t/op/rx.t index 8b137891..4be49e73 100644 --- a/apache2/t/op/rx.t +++ b/apache2/t/op/rx.t @@ -1 +1,62 @@ +### Empty +{ + type => "op", + name => "rx", + param => "", + input => "", + ret => 1, +}, +{ + type => "op", + name => "rx", + param => "TestCase", + input => "", + ret => 0, +}, +{ + type => "op", + name => "rx", + param => "", + input => "TestCase", + ret => 1, +}, + +### General +{ + type => "op", + name => "rx", + param => "abc", + input => "abcdefghi", + ret => 1, +}, +{ + type => "op", + name => "rx", + param => "def", + input => "abcdefghi", + ret => 1, +}, +{ + type => "op", + name => "rx", + param => "ghi", + input => "abcdefghi", + ret => 1, +}, +{ + type => "op", + name => "rx", + param => "ghij", + input => "abcdefghi", + ret => 0, +}, + +### Complex regex +{ + type => "op", + name => "rx", + param => qr/^([^=])\s*=\s*((?:abc)+(?:def|ghi){2})$/i, + input => "x =AbCDeFgHi", + ret => 1, +}, diff --git a/apache2/t/op/streq.t b/apache2/t/op/streq.t index 8b137891..76451fe6 100644 --- a/apache2/t/op/streq.t +++ b/apache2/t/op/streq.t @@ -1 +1,52 @@ +### Empty +{ + type => "op", + name => "streq", + param => "", + input => "", + ret => 1, +}, +{ + type => "op", + name => "streq", + param => "TestCase", + input => "", + ret => 0, +}, +{ + type => "op", + name => "streq", + param => "", + input => "TestCase", + ret => 0, +}, +### General +{ + type => "op", + name => "streq", + param => "abc", + input => "abcdefghi", + ret => 0, +}, +{ + type => "op", + name => "streq", + param => "def", + input => "abcdefghi", + ret => 0, +}, +{ + type => "op", + name => "streq", + param => "ghi", + input => "abcdefghi", + ret => 0, +}, +{ + type => "op", + name => "streq", + param => "abcdefghi", + input => "abcdefghi", + ret => 1, +}, diff --git a/apache2/t/op/unconditionalMatch.t b/apache2/t/op/unconditionalMatch.t index 8b137891..56458d81 100644 --- a/apache2/t/op/unconditionalMatch.t +++ b/apache2/t/op/unconditionalMatch.t @@ -1 +1,23 @@ +### Empty +{ + type => "op", + name => "unconditionalMatch", + param => "", + input => "", + ret => 1, +}, +{ + type => "op", + name => "unconditionalMatch", + param => "TestCase", + input => "", + ret => 1, +}, +{ + type => "op", + name => "unconditionalMatch", + param => "", + input => "TestCase", + ret => 1, +},