stas 2003/01/15 18:43:35 Modified: src/docs/general/testing testing.pod Log: bring the doc in sync with the recent change in the autogenerated code for the client side Revision Changes Path 1.5 +14 -4 modperl-docs/src/docs/general/testing/testing.pod Index: testing.pod =================================================================== RCS file: /home/cvs/modperl-docs/src/docs/general/testing/testing.pod,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- testing.pod 13 Dec 2002 10:46:32 -0000 1.4 +++ testing.pod 16 Jan 2003 02:43:35 -0000 1.5 @@ -1161,11 +1161,21 @@ won't attempt to change it. Then you can see the trace of the calls that generated this test, in case you want to figure out how the test was generated. And finally the test loads the C<Apache::TestRequest> -module, imports the C<GET_BODY> shortcut and prints the response of -the generated request using the C<GET_BODY>: +module, imports the C<GET> shortcut and prints the response's body if +it was successful. Otherwise it dies to flag the problem with the +server side. The latter is done because there is nothing on the client +side, that tells the testing framework that things went wrong. Without +it the test will be skipped, and that's not what we want. - use Apache::TestRequest 'GET_BODY'; - print GET_BODY "/TestApache::write"; + use Apache::TestRequest 'GET'; + my $res = GET "/TestApache::write"; + if ($res->is_success) { + print $res->content; + } + else { + die "server side has failed (response code: ", $res->code, "),\n", + "see t/logs/error_log for more details\n"; + } As you can see the request URI is autogenerated from the response test name:
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]