[Catalyst-commits] r6214 - trunk/Catalyst-Runtime/t

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Tue Mar 27 21:25:45 GMT 2007


Author: andyg
Date: 2007-03-27 21:25:45 +0100 (Tue, 27 Mar 2007)
New Revision: 6214

Modified:
   trunk/Catalyst-Runtime/t/live_component_controller_args.t
Log:
Skip %2F and period tests on remote servers

Modified: trunk/Catalyst-Runtime/t/live_component_controller_args.t
===================================================================
--- trunk/Catalyst-Runtime/t/live_component_controller_args.t	2007-03-27 20:25:11 UTC (rev 6213)
+++ trunk/Catalyst-Runtime/t/live_component_controller_args.t	2007-03-27 20:25:45 UTC (rev 6214)
@@ -11,7 +11,7 @@
 our @paths;
 our $iters;
 
-BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 2;
+BEGIN { $iters = $ENV{CAT_BENCH_ITERS} || 1;
 
 	# add special paths to test here
 	@paths = (
@@ -62,29 +62,36 @@
     } else {
         $path = uri_escape($test);
     }
+    
+    SKIP:
+    {   
+        # Skip %2F and . tests on real webservers, they are often ignored by default
+        if ( $ENV{CATALYST_SERVER} && $path =~ /(?:%2F|\.)/ ) {
+            skip "Skipping $path tests on remote server", 6;
+        }
 
-    my $response;
+        my $response;
 
-    ok( $response = request("http://localhost/args/args/$path"), "Requested args for path $path");
+        ok( $response = request("http://localhost/args/args/$path"), "Requested args for path $path");
 
-    is( $response->content, $test, 'as args' );
+        is( $response->content, $test, "$test as args" );
 
-    undef $response;
+        undef $response;
 
-    ok( $response = request("http://localhost/args/params/$path"), "Requested params for path $path");
+        ok( $response = request("http://localhost/args/params/$path"), "Requested params for path $path");
 
-    is( $response->content, $test, 'as params' );
+        is( $response->content, $test, "$test as params" );
 
-    undef $response;
+        undef $response;
 
-    if( $test =~ m{/} ) {
-        $test =~ s{/}{}g;
-        $path = uri_escape( $test ); 
-    }
+        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");
+        ok( $response = request("http://localhost/chained/multi_cap/$path/baz"), "Requested capture for path $path");
 
-    is( $response->content, join( ', ', split( //, $test ) ) ."; ", 'as capture' );
-
+        is( $response->content, join( ', ', split( //, $test ) ) ."; ", "$test as capture" );
+    }
 }
 




More information about the Catalyst-commits mailing list