perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/devel/testing testing.pod
Date Mon, 21 Jan 2002 04:18:13 GMT
stas        02/01/20 20:18:13

  Modified:    src/docs/2.0/devel/testing testing.pod
  Log:
  - GET_BODY is used instead of http_get_raw now, adjust the examples
  
  Revision  Changes    Path
  1.7       +14 -13    modperl-docs/src/docs/2.0/devel/testing/testing.pod
  
  Index: testing.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/devel/testing/testing.pod,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- testing.pod	14 Jan 2002 03:38:08 -0000	1.6
  +++ testing.pod	21 Jan 2002 04:18:13 -0000	1.7
  @@ -905,14 +905,14 @@
     use Apache::Amazing;
     use Apache::Test;
     use Apache::TestUtil;
  +  use Apache::TestRequest 'GET_BODY';
     
     plan tests => 2;
     
     ok 1; # simple load test
     
  -  my $config = Apache::Test::config();
     my $url = '/test/amazing';
  -  my $data = $config->http_raw_get($url);
  +  my $data = GET_BODY $url;
     
     ok t_cmp(
              "Amazing!",
  @@ -1113,14 +1113,15 @@
   I<t/apache/write.t>.
   
   If we look at the autogenerated test I<t/apache/write.t>, we can see
  -that it start with the warning that it has been autogenerated, so you
  -won't attempt to change it, following by the trace of the calls that
  -generated this test, in case you want to trace back to who generated
  -the test, and finally it loads the C<Apache::TestConfig> module and
  -prints a raw response from the the response part:
  +that it starts with the warning that it has been autogenerated, so you
  +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>:
   
  -  use Apache::TestConfig ();
  -  print Apache::TestConfig->thaw->http_raw_get("/TestApache::write");
  +  use Apache::TestRequest 'GET_BODY';
  +  print GET_BODY "/TestApache::write";
   
   As you can see the request URI is autogenerated from the response test
   name:
  @@ -1192,7 +1193,7 @@
   
     use Apache::Test;
     use Apache::TestUtil;
  -  use Apache::TestRequest;
  +  use Apache::TestRequest 'GET_BODY';
   
     plan tests => 1; # plan one test.
   
  @@ -1201,10 +1202,10 @@
     my $config   = Apache::Test::config();
     my $hostport = Apache::TestRequest::hostport($config) || '';
     t_debug("connecting to $hostport");
  -
  -  my $received = $config->http_raw_get("/TestApache::cool", undef);
  +  
  +  my $received = GET_BODY "/TestApache::cool";
     my $expected = "COOL";
  -
  +  
     ok t_cmp(
              $expected,
              $received,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org


Mime
View raw message