You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2003/03/08 09:54:04 UTC

cvs commit: modperl-2.0/t/apache scanhdrs.t

stas        2003/03/08 00:54:04

  Modified:    t/apache scanhdrs.t
  Log:
  convert the test to use t_cmp, so undefs are automatically handled, rather
  then having the script die
  
  Revision  Changes    Path
  1.4       +7 -4      modperl-2.0/t/apache/scanhdrs.t
  
  Index: scanhdrs.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/apache/scanhdrs.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- scanhdrs.t	11 Sep 2002 00:50:31 -0000	1.3
  +++ scanhdrs.t	8 Mar 2003 08:54:03 -0000	1.4
  @@ -2,6 +2,7 @@
   use warnings FATAL => 'all';
   
   use Apache::Test;
  +use Apache::TestUtil;
   use Apache::TestRequest;
   
   plan tests => 4;
  @@ -11,10 +12,12 @@
   
   my $res = GET $location;
   
  -ok $res->content =~ /^ok 1$/m;
  +t_debug $res->as_string;
   
  -ok $res->header('Content-Type') eq 'text/test-output';
  +ok t_cmp(qr/^ok 1$/m, $res->content);
   
  -ok $res->header('X-Perl-Module') eq $module;
  +ok t_cmp('text/test-output', scalar $res->header('Content-Type'));
   
  -ok $res->message =~ /beer/;
  +ok t_cmp($module, scalar $res->header('X-Perl-Module'));
  +
  +ok t_cmp(qr/beer/, $res->message);