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/devel/writing_tests writing_tests.pod
Date Tue, 20 Nov 2001 04:12:49 GMT
stas        01/11/19 20:12:48

  Modified:    src/devel/writing_tests writing_tests.pod
  Log:
  - start using t_debug() function in tests
  
  Revision  Changes    Path
  1.19      +10 -7     modperl-docs/src/devel/writing_tests/writing_tests.pod
  
  Index: writing_tests.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/devel/writing_tests/writing_tests.pod,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- writing_tests.pod	2001/11/12 04:47:33	1.18
  +++ writing_tests.pod	2001/11/20 04:12:48	1.19
  @@ -639,7 +639,7 @@
   
     my $config   = Apache::Test::config();
     my $hostport = Apache::TestRequest::hostport($config) || '';
  -  print "# connecting to $hostport\n";
  +  t_debug("connecting to $hostport");
   
     my $received = $config->http_raw_get("/TestApache::cool", undef);
     my $expected = "COOL";
  @@ -817,8 +817,9 @@
   All the communications between tests and C<Test::Harness> which
   executes them is done via STDOUT. I.e. whatever tests want to report
   they do by printing something to STDOUT. If a test wants to print some
  -debug comment it should do it on a separate line starting with
  -C<#>.
  +debug comment it should do it starting on a separate line, and each
  +debug line should start with C<#>. The t_debug() function from the
  +C<Apache::TestUtil> package should be used for that purpose.
   
   
   
  @@ -1022,9 +1023,10 @@
   this test snippet:
   
     use Apache::Test;
  +  use Apache::TestUtil;
     plan tests => 3;
     ok "success";
  -  print "# expecting to fail next test\n"
  +  t_debug("expecting to fail next test");
     ok "";
     ok 0;
   
  @@ -1221,13 +1223,14 @@
     debug_comments.t
     ----------------
     use Apache::Test;
  +  use Apache::TestUtil;
     plan tests => 1;
     
  -  print "# testing feature foo\n";
  +  t_debug("testing feature foo");
     $expected = "a good value";
     $received = "a bad value";
  -  print "# expected: $expected\n";
  -  print "# received: $received\n";
  +  t_debug("expected: $expected");
  +  t_debug("received: $received");
     ok defined $received && $received eq $expected;
   
   If in this example C<$received> gets assigned I<a bad value> string,
  
  
  

---------------------------------------------------------------------
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