[Catalyst-commits] r12175 - in HTTP-Request-AsCGI/trunk: . t
NoFixedAbode at dev.catalyst.perl.org
NoFixedAbode at dev.catalyst.perl.org
Thu Dec 3 23:06:54 GMT 2009
Author: NoFixedAbode
Date: 2009-12-03 23:06:54 +0000 (Thu, 03 Dec 2009)
New Revision: 12175
Modified:
HTTP-Request-AsCGI/trunk/Changes
HTTP-Request-AsCGI/trunk/t/05env.t
Log:
added test to check that $ENV is preserved after setup is called
Modified: HTTP-Request-AsCGI/trunk/Changes
===================================================================
--- HTTP-Request-AsCGI/trunk/Changes 2009-12-03 22:49:16 UTC (rev 12174)
+++ HTTP-Request-AsCGI/trunk/Changes 2009-12-03 23:06:54 UTC (rev 12175)
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension HTTP::Request::AsCGI.
+1.0 2009-12-03
+ - added test to check that $ENV is preserved after setup is called
+
1.0 2009-11-30
- Change how PATH_INFO is decoded so that everything is decoded, including
URI reserved characters (RT#50082)
Modified: HTTP-Request-AsCGI/trunk/t/05env.t
===================================================================
--- HTTP-Request-AsCGI/trunk/t/05env.t 2009-12-03 22:49:16 UTC (rev 12174)
+++ HTTP-Request-AsCGI/trunk/t/05env.t 2009-12-03 23:06:54 UTC (rev 12175)
@@ -1,6 +1,6 @@
#!perl
-use Test::More tests => 10;
+use Test::More tests => 11;
use strict;
use warnings;
@@ -9,6 +9,8 @@
use HTTP::Request::AsCGI;
use Encode;
+$ENV{__PRESERVE_ENV_TEST} = 1;
+
my $r = HTTP::Request->new( GET => 'http://www.host.com/cgi-bin/script.cgi/my%20path%2F?a=1&b=2', [ 'X-Test' => 'Test' ] );
my %e = (
SCRIPT_NAME => '/cgi-bin/script.cgi',
@@ -31,6 +33,8 @@
is( $ENV{SERVER_NAME}, 'www.host.com', 'SERVER_NAME' );
is( $ENV{SERVER_PORT}, '80', 'SERVER_PORT' );
+is( $ENV{__PRESERVE_ENV_TEST}, 1, 'PRESERVE_ENV' );
+
$c->restore;
is( $ENV{GATEWAY_INTERFACE}, undef, 'No CGI env after restore' );
More information about the Catalyst-commits
mailing list