stas 2002/12/29 16:59:23 Modified: t/directive perlloadmodule3.t Log: make this test work with Apache::TestClient, Apache::TestRequest::module() affects global testing env, so should run it only when it's needed. Revision Changes Path 1.3 +7 -8 modperl-2.0/t/directive/perlloadmodule3.t Index: perlloadmodule3.t =================================================================== RCS file: /home/cvs/modperl-2.0/t/directive/perlloadmodule3.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- perlloadmodule3.t 21 Dec 2002 03:47:18 -0000 1.2 +++ perlloadmodule3.t 30 Dec 2002 00:59:23 -0000 1.3 @@ -9,15 +9,11 @@ my $config = Apache::Test::config(); my $base_hostport = Apache::TestRequest::hostport($config); -Apache::TestRequest::module($module); -my $hostport = Apache::TestRequest::hostport($config); - -# XXX: probably a good idea to split into more tests, that test -# smaller portions of information, but requires a more elaborated -# logic. +# XXX: probably a good idea to split into more sub-tests, that test +# smaller portions of information, but requires a more elaborate +# logic. Alternatively could use diff($expected, $received). -# XXX: this subtest fails when lwp is not installed, need to investigate -plan tests => 3, todo => [1]; +plan tests => 3; t_debug("connecting to $base_hostport"); { @@ -40,6 +36,9 @@ my $received = GET_BODY $location; ok t_cmp($expected, $received, "server merge"); } + +Apache::TestRequest::module($module); +my $hostport = Apache::TestRequest::hostport($config); t_debug("connecting to $hostport"); {