From: Matt S Trout Date: Sun, 27 Aug 2006 15:17:48 +0000 (+0000) Subject: test for capture fix, missing svk add X-Git-Tag: 5.7099_04~359 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=642026ea901ef434f74d029a8374f5df0b6168eb test for capture fix, missing svk add --- diff --git a/t/lib/TestApp/Controller/Action/Chained/Root.pm b/t/lib/TestApp/Controller/Action/Chained/Root.pm new file mode 100644 index 0000000..a0cc626 --- /dev/null +++ b/t/lib/TestApp/Controller/Action/Chained/Root.pm @@ -0,0 +1,13 @@ +package TestApp::Controller::Action::Chained::Root; + +use strict; +use warnings; + +use base qw( Catalyst::Controller ); + +__PACKAGE__->config->{namespace} = ''; + +sub rootsub : PathPart Chained( '/' ) CaptureArgs( 1 ) { } +sub endpointsub : PathPart Chained( 'rootsub' ) Args( 1 ) { } + +1; diff --git a/t/live_component_controller_args.t b/t/live_component_controller_args.t index 9bdd7d9..0b869f5 100644 --- a/t/live_component_controller_args.t +++ b/t/live_component_controller_args.t @@ -30,7 +30,7 @@ BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2; ); } -use Test::More tests => 4*@paths * $iters; +use Test::More tests => 6*@paths * $iters; use Catalyst::Test 'TestApp'; if ( $ENV{CAT_BENCHMARK} ) { @@ -74,5 +74,17 @@ sub run_test_for { ok( $response = request("http://localhost/args/params/$path"), "Requested params for path $path"); is( $response->content, $test, 'as params' ); + + undef $response; + + if( $test =~ m{/} ) { + $test =~ s{/}{}g; + $path = uri_escape( $test ); + } + + ok( $response = request("http://localhost/chained/multi_cap/$path/baz"), "Requested capture for path $path"); + + is( $response->content, join( ', ', split( //, $test ) ) ."; ", 'as capture' ); + }