X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fdispatch_parser.t;fp=t%2Fdispatch_parser.t;h=8405d7d8c82d25d70bf7645820a76abd6bcd1798;hb=1c4f4b78368069e0c626aa5cd70c8fb55f594538;hp=dae8ad4cf7c7b03189cc0f9e2554a734ce6f676b;hpb=12b3e9a3a9202abfd0565e4a02ae116c6bf5afdb;p=catagits%2FWeb-Simple.git diff --git a/t/dispatch_parser.t b/t/dispatch_parser.t index dae8ad4..8405d7d 100644 --- a/t/dispatch_parser.t +++ b/t/dispatch_parser.t @@ -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(