X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05env.t;fp=t%2F05env.t;h=49dd7bdedf57e651d8848e0ff64c2171ed4cd146;hb=cc263caa3f866bfcd3c1294ff80ee8627a2213cb;hp=6a473214f5d1a4aa9461b217465f22f47a2efb6d;hpb=d12b2a96f73c4d4927003410ac708ec6f027e5ce;p=catagits%2FHTTP-Request-AsCGI.git diff --git a/t/05env.t b/t/05env.t index 6a47321..49dd7bd 100644 --- a/t/05env.t +++ b/t/05env.t @@ -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; 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{REQUEST_METHOD}, 'GET', 'REQUEST_METHOD' ); 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' );