the ... part of '/foo...' should match ONLY empty string or something starting with /
[catagits/Web-Simple.git] / t / dispatch_parser.t
index 8b6f4ab..6cfcb9e 100644 (file)
@@ -329,6 +329,12 @@ my $dp = Web::Dispatch::Parser->new;
   my $sub = $dp->parse($match);
 
   is_deeply(
+    [ $sub->({ PATH_INFO => '/foobar' }) ],
+    [],
+    "$match does not match /foobar"
+  );
+
+  is_deeply(
     [ $sub->({ PATH_INFO => '/foo/bar' }) ],
     [ { PATH_INFO => '/bar', SCRIPT_NAME => '/foo' } ],
     "$match matches /foo/bar and strips to /bar"