perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/t/apache post.t
Date Mon, 02 Apr 2001 09:08:40 GMT
dougm       01/04/02 02:08:40

  Added:       t/apache post.t
  Log:
  the POST test driver
  
  Revision  Changes    Path
  1.1                  modperl-2.0/t/apache/post.t
  
  Index: post.t
  ===================================================================
  use strict;
  use warnings FATAL => 'all';
  
  use Test;
  use Apache::TestRequest;
  
  plan tests => 2;
  
  my $location = "/TestApache::post";
  my $str;
  
  my @data = (arizona => 'wildcats');
  my %data = @data;
  
  $str = POST_BODY $location, \@data;
  
  ok $str;
  
  my $data = join '&', map { "$_=$data{$_}" } keys %data;
  
  $str = POST_BODY $location, content => $data;
  
  my $expect = join(':', length($data), $data);
  ok $str eq $expect;
  
  print "EXPECT: $expect\n";
  print "STR: $str\n";
  
  
  
  

Mime
View raw message