5 # Due to a bug in older versions of MakeMaker & Test::Harness, we must
6 # ensure the blib's are in @INC, else we might use the core CGI.pm
7 use lib qw(blib/lib blib/arch);
12 eval { require FCGI };
16 use Test::More tests => 7;
18 # Shut up "used only once" warnings.
20 () = $CGI::Fast::Ext_Request;
23 skip( 'FCGI not installed, cannot continue', 7 ) unless $fcgi;
26 ok( my $q = CGI::Fast->new(), 'created new CGI::Fast object' );
27 is( $q, $CGI::Q, 'checking to see if the object was stored properly' );
28 is( $q->param(), (), 'no params' );
30 ok( $q = CGI::Fast->new({ foo => 'bar' }), 'creating obect with params' );
31 is( $q->param('foo'), 'bar', 'checking passed param' );
33 # if this is false, the package var will be empty
34 $ENV{FCGI_SOCKET_PATH} = 0;
35 is( $CGI::Fast::Ext_Request, '', 'checking no active request' );