adapted to take dashes
[catagits/Web-Simple.git] / t / dispatch_parser.t
index dae8ad4..8405d7d 100644 (file)
@@ -93,6 +93,22 @@ ok(
 }
 
 {
+   my $post = $dp->parse('/foo-bar/*');
+
+   is_deeply(
+     [ $post->({ PATH_INFO => '/foo-bar/one' }) ],
+     [ {}, 'one' ],
+     '/foo-bar/one parses out one'
+   );
+
+   is_deeply(
+     [ $post->({ PATH_INFO => '/foo-bar/one/' }) ],
+     [],
+     '/foo-bar/one/ does not match'
+   );
+}
+
+{
    my $combi = $dp->parse('GET+/post/*');
 
    is_deeply(