Change Catalsyt _parse_attrs so that when sub attr handlers:
[catagits/Catalyst-Runtime.git] / t / aggregate / live_component_controller_action_path_matchsingle.t
CommitLineData
9dac01c7 1#!perl
2
3use strict;
4use warnings;
5
6use FindBin;
7use lib "$FindBin::Bin/../lib";
8
9our $iters;
10
11BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1; }
12
81f25ce6 13use Test::More;
9dac01c7 14use Catalyst::Test 'TestAppMatchSingleArg';
15
81f25ce6 16plan 'skip_all' if ( $ENV{CATALYST_SERVER} );
17
18plan tests => 3*$iters;
19
9dac01c7 20if ( $ENV{CAT_BENCHMARK} ) {
21 require Benchmark;
22 Benchmark::timethis( $iters, \&run_tests );
23}
24else {
25 for ( 1 .. $iters ) {
26 run_tests();
27 }
28}
29
30sub run_tests {
31 {
cdf573a6 32 is(get('/foo/bar/baz'), 'Path', 'multiple args matched :Path');
9dac01c7 33 is(get('/foo'), 'Path Args(1)', 'single arg matched :Path Args(1)');
cdf573a6 34 is(get('/foo/bar'), 'Path Args(2)', 'two args matched :Path Args(2)');
9dac01c7 35 }
36}