Add inner ** test
Mateu X Hunter [Wed, 14 Dec 2011 20:29:38 +0000 (13:29 -0700)]
t/dispatch_parser.t

index e260565..8b7966e 100644 (file)
@@ -276,6 +276,16 @@ my $dp = Web::Dispatch::Parser->new;
 }
 
 {
+  my $sub = $dp->parse('/foo/**/belief');
+  my $match = 'barred/beyond';
+  is_deeply(
+    [ $sub->({ PATH_INFO => "/foo/${match}/belief" }) ],
+    [ {}, $match ],
+    "/foo/**/belief matches /foo/${match}/belief"
+  );
+}
+
+{
   my @dot_pairs = (
     [ '/one/*' => 'two' ],
     [ '/one/*.*' => 'two.three' ],