httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/ssl basicauth.t http.t proxy.t
Date Thu, 30 Sep 2004 14:54:40 GMT
geoff       2004/09/30 07:54:40

  Modified:    perl-framework/t/apache acceptpathinfo.t chunkinput.t
                        errordoc.t getfile.t limits.t options.t
               perl-framework/t/filter input_body.t
               perl-framework/t/http11 chunked.t
               perl-framework/t/modules alias.t asis.t autoindex2.t cgi.t
                        negotiation.t vhost_alias.t
               perl-framework/t/php arg.t func5.t getenv.t getlastmod.t
                        ifmodsince.t umask.t var1.t var2.t var3.t
               perl-framework/t/protocol echo.t
               perl-framework/t/ssl basicauth.t http.t proxy.t
  Log:
  swap t_cmp() arguments where they appeared to not match the current
  function order.
  
  Revision  Changes    Path
  1.5       +2 -2      httpd-test/perl-framework/t/apache/acceptpathinfo.t
  
  Index: acceptpathinfo.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/acceptpathinfo.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- acceptpathinfo.t	4 Aug 2004 15:44:08 -0000	1.4
  +++ acceptpathinfo.t	30 Sep 2004 14:54:39 -0000	1.5
  @@ -57,8 +57,8 @@
               my $req = $loc.$tests{$mode}[0].$file.$pinf;
   
               my $actual = GET_RC "$req";
  -            ok t_cmp($expectedrc,
  -                     $actual,
  +            ok t_cmp($actual,
  +                     $expectedrc,
                        "AcceptPathInfo $mode return code for $req"
                       );
   
  
  
  
  1.7       +2 -2      httpd-test/perl-framework/t/apache/chunkinput.t
  
  Index: chunkinput.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/chunkinput.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- chunkinput.t	13 May 2004 11:18:20 -0000	1.6
  +++ chunkinput.t	30 Sep 2004 14:54:39 -0000	1.7
  @@ -57,7 +57,7 @@
       #Read the status line
       chomp(my $response = Apache::TestRequest::getline($sock));
       $response =~ s/\s$//;
  -    ok t_cmp($resp_strings[$cycle++], $response, "response codes");
  +    ok t_cmp($response, $resp_strings[$cycle++], "response codes");
   
       do {
           chomp($response = Apache::TestRequest::getline($sock));
  @@ -68,7 +68,7 @@
       if ($cycle == 1) {
           $response = Apache::TestRequest::getline($sock);
           chomp($response) if (defined($response));
  -        ok t_cmp("$$", $response, "trailer (pid)");
  +        ok t_cmp($response, "$$", "trailer (pid)");
       }
     }
   }
  
  
  
  1.6       +20 -20    httpd-test/perl-framework/t/apache/errordoc.t
  
  Index: errordoc.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/errordoc.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- errordoc.t	4 Aug 2004 15:44:08 -0000	1.5
  +++ errordoc.t	30 Sep 2004 14:54:39 -0000	1.6
  @@ -15,8 +15,8 @@
       my $response = GET '/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                'notfound.html code');
   
       ok t_cmp($content,
  @@ -28,8 +28,8 @@
       my $response = GET '/inherit/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                '/inherit/notfound.html code');
   
       ok t_cmp($content,
  @@ -41,12 +41,12 @@
       my $response = GET '/redefine/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                '/redefine/notfound.html code');
   
  -    ok t_cmp('per-dir 404',
  -             $content,
  +    ok t_cmp($content,
  +             'per-dir 404',
                '/redefine/notfound.html content');
   }
   
  @@ -54,8 +54,8 @@
       my $response = GET '/restore/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                '/redefine/notfound.html code');
   
       # 1.3 requires quotes for hard-coded messages
  @@ -72,12 +72,12 @@
       my $response = GET '/apache/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                '/merge/notfound.html code');
   
  -    ok t_cmp('testing merge',
  -             $content,
  +    ok t_cmp($content,
  +             'testing merge',
                '/merge/notfound.html content');
   }
   
  @@ -85,12 +85,12 @@
       my $response = GET '/apache/etag/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                '/merge/merge2/notfound.html code');
   
  -    ok t_cmp('testing merge',
  -             $content,
  +    ok t_cmp($content,
  +             'testing merge',
                '/merge/merge2/notfound.html content');
   }
   
  @@ -98,8 +98,8 @@
       my $response = GET '/bounce/notfound.html';
       chomp(my $content = $response->content);
   
  -    ok t_cmp(404,
  -             $response->code,
  +    ok t_cmp($response->code,
  +             404,
                '/bounce/notfound.html code');
   
       ok t_cmp($content,
  
  
  
  1.9       +1 -1      httpd-test/perl-framework/t/apache/getfile.t
  
  Index: getfile.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/getfile.t,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- getfile.t	11 Dec 2001 05:12:08 -0000	1.8
  +++ getfile.t	30 Sep 2004 14:54:39 -0000	1.9
  @@ -20,5 +20,5 @@
                           $received += length $chunk;
                       });
   
  -    ok t_cmp($flen, $received, "download of $url");
  +    ok t_cmp($received, $flen, "download of $url");
   }
  
  
  
  1.15      +10 -10    httpd-test/perl-framework/t/apache/limits.t
  
  Index: limits.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/limits.t,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- limits.t	4 Aug 2004 15:44:08 -0000	1.14
  +++ limits.t	30 Sep 2004 14:54:39 -0000	1.15
  @@ -74,8 +74,8 @@
               }
               print "# Testing LimitRequestFields; should $goodbad\n";
               $resp = GET('/apache/limits/', %fields, 'X-Subtest' => $testnum);
  -            ok t_cmp($expected_rc,
  -                     $resp->code,
  +            ok t_cmp($resp->code,
  +                     $expected_rc,
                        "Test #$testnum");
               if ($resp->code != $expected_rc) {
                   print_response($resp);
  @@ -119,8 +119,8 @@
                           local $expected_rc = 400 if $goodbad eq 'fail' &&
                                                       have_apache(1); 
   
  -                        ok t_cmp($expected_rc,
  -                                 $resp->code,
  +                        ok t_cmp($resp->code,
  +                                 $expected_rc,
                                    "Test #$testnum");
                           if ($resp->code != $expected_rc) {
                               print_response($resp);
  @@ -130,8 +130,8 @@
                   else {
                       $resp = GET('/apache/limits/', content_type => 'text/plain',
                                   content => $param, 'X-Subtest' => $testnum);
  -                    ok t_cmp($expected_rc,
  -                             $resp->code,
  +                    ok t_cmp($resp->code,
  +                             $expected_rc,
                                "Test #$testnum");
                       if ($resp->code != $expected_rc) {
                           print_response($resp);
  @@ -144,8 +144,8 @@
               print "# Testing LimitRequestFieldSize; should $goodbad\n";
               $resp = GET('/apache/limits/', 'X-Subtest' => $testnum,
                           'X-overflow-field' => $param);
  -            ok t_cmp($expected_rc,
  -                     $resp->code,
  +            ok t_cmp($resp->code,
  +                     $expected_rc,
                        "Test #$testnum");
               if ($resp->code != $expected_rc) {
                   print_response($resp);
  @@ -155,8 +155,8 @@
           elsif ($cond eq 'requestline') {
               print "# Testing LimitRequestLine; should $goodbad\n";
               $resp = GET($param, 'X-Subtest' => $testnum);
  -            ok t_cmp($expected_rc,
  -                     $resp->code,
  +            ok t_cmp($resp->code,
  +                     $expected_rc,
                        "Test #$testnum");
               if ($resp->code != $expected_rc) {
                   print_response($resp);
  
  
  
  1.5       +1 -1      httpd-test/perl-framework/t/apache/options.t
  
  Index: options.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/apache/options.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- options.t	7 Aug 2004 02:17:53 -0000	1.4
  +++ options.t	30 Sep 2004 14:54:39 -0000	1.5
  @@ -11,7 +11,7 @@
   
   for my $url (@urls) {
       my $res = OPTIONS $url;
  -    ok t_cmp 200, $res->code, "code";
  +    ok t_cmp $res->code, 200, "code";
       my $allow = $res->header('Allow') || '';
       ok t_cmp $allow, qr/OPTIONS/, "OPTIONS";
   }
  
  
  
  1.4       +2 -2      httpd-test/perl-framework/t/filter/input_body.t
  
  Index: input_body.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/filter/input_body.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- input_body.t	24 Dec 2001 06:10:47 -0000	1.3
  +++ input_body.t	30 Sep 2004 14:54:39 -0000	1.4
  @@ -13,7 +13,7 @@
       my $expected = "ok $x";
       my $data = scalar reverse $expected;
       my $response = POST_BODY $location, content => $data;
  -    ok t_cmp($expected,
  -             $response,
  +    ok t_cmp($response,
  +             $expected,
                "Posted \"$data\"");
   }
  
  
  
  1.18      +20 -20    httpd-test/perl-framework/t/http11/chunked.t
  
  Index: chunked.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/http11/chunked.t,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- chunked.t	4 Aug 2004 15:44:09 -0000	1.17
  +++ chunked.t	30 Sep 2004 14:54:40 -0000	1.18
  @@ -37,8 +37,8 @@
               $length = $1;
           }
   
  -        ok t_cmp("HTTP/1.1",
  -                 $res->protocol,
  +        ok t_cmp($res->protocol,
  +                 "HTTP/1.1",
                    "response protocol"
                   );
   
  @@ -47,18 +47,18 @@
                     '';
           my $ct  = $res->header('Content-Length') || 0;
   
  -        ok t_cmp("chunked",
  -                 $enc,
  +        ok t_cmp($enc,
  +                 "chunked",
                    "response Transfer-Encoding"
                   );
   
  -        ok t_cmp(0,
  -                 $ct,
  +        ok t_cmp($ct,
  +                 0,
                    "no Content-Length"
                   );
   
  -        ok t_cmp($length,
  -                 length($body),
  +        ok t_cmp(length($body),
  +                 $length,
                    "body length"
                   );
   
  @@ -66,8 +66,8 @@
           my $request_num =
             Apache::TestRequest::user_agent_request_num($res);
   
  -        return t_cmp($requests,
  -                     $request_num,
  +        return t_cmp($request_num,
  +                     $requests,
                        "number of requests"
                       );
       }, 5;
  @@ -85,26 +85,26 @@
               $length = $1;
           }
   
  -        ok t_cmp("HTTP/1.1",
  -                 $res->protocol,
  +        ok t_cmp($res->protocol,
  +                 "HTTP/1.1",
                    "response protocol"
                   );
   
           my $enc = $res->header('Transfer-Encoding') || '';
           my $ct  = $res->header('Content-Length') || '';
   
  -        ok !t_cmp("chunked",
  -                  $enc,
  +        ok !t_cmp($enc,
  +                  "chunked",
                     "no Transfer-Encoding (test result inverted)"
                    );
   
  -        ok t_cmp((($ct eq '') ? $ct : $content_length),
  -                 $ct,
  +        ok t_cmp($ct,
  +                 (($ct eq '') ? $ct : $content_length),
                    "content length"
                   );
   
  -        ok t_cmp($length,
  -                 length($body),
  +        ok t_cmp(length($body),
  +                 $length,
                    "body length"
                   );
   
  @@ -112,8 +112,8 @@
           my $request_num =
             Apache::TestRequest::user_agent_request_num($res);
   
  -        return t_cmp($requests,
  -                     $request_num,
  +        return t_cmp($request_num,
  +                     $requests,
                        "number of requests"
                       );
       }, 5;
  
  
  
  1.11      +20 -20    httpd-test/perl-framework/t/modules/alias.t
  
  Index: alias.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/modules/alias.t,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- alias.t	6 Apr 2004 04:01:48 -0000	1.10
  +++ alias.t	30 Sep 2004 14:54:40 -0000	1.11
  @@ -44,19 +44,19 @@
   
   ## simple alias ##
   t_debug "verifying simple aliases";
  -ok t_cmp(200,
  -         GET_RC "/alias/",
  +ok t_cmp((GET_RC "/alias/"),
  +         200,
            "/alias/");
   ## alias to a non-existant area ##
  -ok t_cmp(404,
  -         GET_RC "/bogu/",
  +ok t_cmp((GET_RC "/bogu/"),
  +         404,
            "/bogu/");
   
   
   t_debug "verifying alias match with /ali[0-9].";
   for (my $i=0 ; $i <= 9 ; $i++) {
  -    ok t_cmp($i,
  -             GET_BODY "/ali$i",
  +    ok t_cmp((GET_BODY "/ali$i"),
  +             $i,
                "/ali$i");
   }
   
  @@ -68,8 +68,8 @@
   
       $expected = $redirect{$_};
       $actual = GET_RC "/$_";
  -    ok t_cmp($expected,
  -             $actual,
  +    ok t_cmp($actual,
  +             $expected,
                "/$_");
   }
   
  @@ -78,8 +78,8 @@
       for (my $i=0 ; $i <= 9 ; $i++) {
           $expected = $i;
           $actual = GET_BODY "/$_$i";
  -        ok t_cmp($expected,
  -                 $actual,
  +        ok t_cmp($actual,
  +                 $expected,
                    "/$_$i");
       }
   }
  @@ -93,8 +93,8 @@
       $expected = $rm_rc{$_};
       for (my $i=0 ; $i <= 9 ; $i++) {
           $actual = GET_RC "$_$i";
  -        ok t_cmp($expected,
  -                 $actual,
  +        ok t_cmp($actual,
  +                 $expected,
                    "$_$i");
       }
   }
  @@ -116,26 +116,26 @@
   
   ## if we get the script here it will be plain text ##
   t_debug "verifying /modules/alias/script is plain text";
  -ok t_cmp($cgi,
  -          GET_BODY "/modules/alias/script",
  +ok t_cmp((GET_BODY "/modules/alias/script"),
  +         $cgi,
             "/modules/alias/script") unless WINFU;
   
   ## here it should be the result of the executed cgi ##
   t_debug "verifying same file accessed at /cgi/script is executed code";
  -ok t_cmp("$string\n",
  -         GET_BODY "/cgi/script",
  +ok t_cmp((GET_BODY "/cgi/script"),
  +         "$string\n",
            "/cgi/script") unless WINFU;
   
   ## with ScriptAliasMatch ##
   t_debug "verifying ScriptAliasMatch with /aliascgi-script";
  -ok t_cmp("$string\n",
  -         GET_BODY "/aliascgi-script",
  +ok t_cmp((GET_BODY "/aliascgi-script"),
  +         "$string\n",
            "/aliascgi-script") unless WINFU;
   
   ## failure with ScriptAliasMatch ##
   t_debug "verifying bad script alias.";
  -ok t_cmp(404,
  -         GET_RC "/aliascgi-nada",
  +ok t_cmp((GET_RC "/aliascgi-nada"),
  +         404,
            "/aliascgi-nada") unless WINFU;
   
   ## clean up ##
  
  
  
  1.4       +3 -3      httpd-test/perl-framework/t/modules/asis.t
  
  Index: asis.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/modules/asis.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- asis.t	4 Aug 2004 15:44:09 -0000	1.3
  +++ asis.t	30 Sep 2004 14:54:40 -0000	1.4
  @@ -12,10 +12,10 @@
   plan tests => 3, need_module 'asis';
   
   my $body = GET_BODY "/modules/asis/foo.asis";
  -ok t_cmp("This is asis content.\n", $body, "asis content OK");
  +ok t_cmp($body, "This is asis content.\n", "asis content OK");
   
   my $rc = GET_RC "/modules/asis/notfound.asis";
  -ok t_cmp(404, $rc, "asis gave 404 error");
  +ok t_cmp($rc, 404, "asis gave 404 error");
   
   $rc = GET_RC "/modules/asis/forbid.asis";
  -ok t_cmp(403, $rc, "asis gave 403 error");
  +ok t_cmp($rc, 403, "asis gave 403 error");
  
  
  
  1.5       +2 -2      httpd-test/perl-framework/t/modules/autoindex2.t
  
  Index: autoindex2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/modules/autoindex2.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- autoindex2.t	18 May 2004 09:48:13 -0000	1.4
  +++ autoindex2.t	30 Sep 2004 14:54:40 -0000	1.5
  @@ -38,8 +38,8 @@
   # simply test whether we get the sub-dir listed or not
   for my $dir (sort keys %dirs) {
       my $found = $res =~ /$dir/ ? 1 : 0;
  -    ok t_cmp($dirs{$dir}, 
  -             $found, 
  +    ok t_cmp($found,
  +             $dirs{$dir}, 
                "$dir should @{[$dirs{$dir}?'':'not ']}be listed");
   }
   
  
  
  
  1.17      +4 -4      httpd-test/perl-framework/t/modules/cgi.t
  
  Index: cgi.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/modules/cgi.t,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- cgi.t	4 Aug 2004 15:44:09 -0000	1.16
  +++ cgi.t	30 Sep 2004 14:54:40 -0000	1.17
  @@ -120,8 +120,8 @@
   foreach (sort keys %test) {
       $expected = $test{$_}{rc};
       $actual = GET_RC "$path/$_";
  -    ok t_cmp($expected,
  -             $actual,
  +    ok t_cmp($actual,
  +             $expected,
                "return code for $_"
               );
   
  @@ -130,8 +130,8 @@
           $actual = GET_BODY "$path/$_";
           chomp $actual if $actual =~ /\n$/;
   
  -        ok t_cmp($expected,
  -                 $actual,
  +        ok t_cmp($actual,
  +                 $expected,
                    "body for $_"
                   );
       }
  
  
  
  1.8       +16 -16    httpd-test/perl-framework/t/modules/negotiation.t
  
  Index: negotiation.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/modules/negotiation.t,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- negotiation.t	17 Apr 2002 23:09:53 -0000	1.7
  +++ negotiation.t	30 Sep 2004 14:54:40 -0000	1.8
  @@ -57,19 +57,19 @@
       $actual = GET_BODY "/modules/negotiation/$_/";
       print "# GET /modules/negotiation/$_/\n";
       my_chomp();
  -    ok t_cmp("index.html.$_", $actual,
  +    ok t_cmp($actual, "index.html.$_",
                "Verify correct default language for index.$_.foo");
   
       $actual = GET_BODY "/modules/negotiation/$_/compressed/";
       print "# GET /modules/negotiation/$_/compressed/\n";
       my_chomp();
  -    ok t_cmp("index.html.$_.gz", $actual,
  +    ok t_cmp($actual, "index.html.$_.gz",
                "Verify correct default language for index.$_.foo.gz");
   
       $actual = GET_BODY "/modules/negotiation/$_/two/index";
       print "# GET /modules/negotiation/$_/two/index\n";
       my_chomp();
  -    ok t_cmp("index.$_.html", $actual,
  +    ok t_cmp($actual, "index.$_.html",
                "Verify correct default language for index.$_.html");
   
       foreach my $ext (@language) {
  @@ -77,13 +77,13 @@
           ## verify that you can explicitly request all language files.
           my $resp = GET("/modules/negotiation/$_/index.html.$ext");
           print "# GET /modules/negotiation/$_/index.html.$ext\n";
  -        ok t_cmp(200,
  -                 $resp->code,
  +        ok t_cmp($resp->code,
  +                 200,
                    "Explicitly request $_/index.html.$ext");
           $resp = GET("/modules/negotiation/$_/two/index.$ext.html");
           print "# GET /modules/negotiation/$_/two/index.$ext.html\n";
  -        ok t_cmp(200,
  -                 $resp->code,
  +        ok t_cmp($resp->code,
  +                 200,
                    "Explicitly request $_/two/index.$ext.html");
   
           ## verify that even tho there is a default language,
  @@ -92,14 +92,14 @@
               'Accept-Language' => $ext;
           print "# GET /modules/negotiation/$_/\n# Accept-Language: $ext\n";
           my_chomp();
  -        ok t_cmp("index.html.$ext", $actual,
  +        ok t_cmp($actual, "index.html.$ext",
                    "Verify with a default language Accept-Language still obeyed");
   
           $actual = GET_BODY "/modules/negotiation/$_/compressed/",
               'Accept-Language' => $ext;
           print "# GET /modules/negotiation/$_/compressed/\n# Accept-Language: $ext\n";
           my_chomp();
  -        ok t_cmp("index.html.$ext.gz", $actual,
  +        ok t_cmp($actual, "index.html.$ext.gz",
                    "Verify with a default language Accept-Language still ".
                      "obeyed (compression on)");
   
  @@ -107,7 +107,7 @@
               'Accept-Language' => $ext;
           print "# GET /modules/negotiation/$_/two/index\n# Accept-Language: $ext\n";
           my_chomp();
  -        ok t_cmp("index.$ext.html", $actual,
  +        ok t_cmp($actual, "index.$ext.html",
                    "Verify with a default language Accept-Language still obeyed");
   
       }
  @@ -121,21 +121,21 @@
       'Accept-Language' => "$en; q=0.1, $fr; q=0.4, $fu; q=0.9, $de; q=0.2";
   print "# GET /modules/negotiation/$en/\n# Accept-Language: $en; q=0.1, $fr; q=0.4, $fu;
q=0.9, $de; q=0.2\n";
   my_chomp();
  -ok t_cmp("index.html.$fu", $actual,
  +ok t_cmp($actual, "index.html.$fu",
            "fu has a higher quality rating, so we expect fu");
   
   $actual = GET_BODY "/modules/negotiation/$en/two/index",
       'Accept-Language' => "$en; q=0.1, $fr; q=0.4, $fu; q=0.9, $de; q=0.2";
   print "# GET /modules/negotiation/$en/two/index\n# Accept-Language: $en; q=0.1, $fr; q=0.4,
$fu; q=0.9, $de; q=0.2\n";
   my_chomp();
  -ok t_cmp("index.$fu.html", $actual,
  +ok t_cmp($actual, "index.$fu.html",
            "fu has a higher quality rating, so we expect fu");
   
   $actual = GET_BODY "/modules/negotiation/$en/compressed/",
       'Accept-Language' => "$en; q=0.1, $fr; q=0.4, $fu; q=0.9, $de; q=0.2";
   print "# GET /modules/negotiation/$en/compressed/\n# Accept-Language: $en; q=0.1, $fr;
q=0.4, $fu; q=0.9, $de; q=0.2\n";
   my_chomp();
  -ok t_cmp("index.html.$fu.gz", $actual,
  +ok t_cmp($actual, "index.html.$fu.gz",
            "fu has a higher quality rating, so we expect fu");
   
   ## 'bu' has the highest quality rating, but is non-existant,
  @@ -144,19 +144,19 @@
       'Accept-Language' => "$en; q=0.1, $fr; q=0.4, $bu; q=1.0";
   print "# GET /modules/negotiation/$en/\n# Accept-Language: $en; q=0.1, $fr; q=0.4, $bu;
q=1.0\n";
   my_chomp();
  -ok t_cmp("index.html.$fr", $actual,
  +ok t_cmp($actual, "index.html.$fr",
            "bu has the highest quality but is non-existant, so fr is next best");
   
   $actual = GET_BODY "/modules/negotiation/$en/two/index",
       'Accept-Language' => "$en; q=0.1, $fr; q=0.4, $bu; q=1.0";
   print "# GET /modules/negotiation/$en/two/index\n# Accept-Language: $en; q=0.1, $fr; q=0.4,
$bu; q=1.0\n";
   my_chomp();
  -ok t_cmp("index.$fr.html", $actual,
  +ok t_cmp($actual, "index.$fr.html",
            "bu has the highest quality but is non-existant, so fr is next best");
   
   $actual = GET_BODY "/modules/negotiation/$en/compressed/",
       'Accept-Language' => "$en; q=0.1, $fr; q=0.4, $bu; q=1.0";
   print "# GET /modules/negotiation/$en/compressed/\n# Accept-Language: $en; q=0.1, $fr;
q=0.4, $bu; q=1.0\n";
   my_chomp();
  -ok t_cmp("index.html.$fr.gz", $actual,
  +ok t_cmp($actual, "index.html.$fr.gz",
            "bu has the highest quality but is non-existant, so fr is next best");
  
  
  
  1.14      +4 -4      httpd-test/perl-framework/t/modules/vhost_alias.t
  
  Index: vhost_alias.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/modules/vhost_alias.t,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- vhost_alias.t	4 Aug 2004 15:44:09 -0000	1.13
  +++ vhost_alias.t	30 Sep 2004 14:54:40 -0000	1.14
  @@ -83,8 +83,8 @@
   ## run tests ##
   foreach (@vh) {
       ## test VirtalDocumentRoot ##
  -    ok t_cmp($_,
  -             GET_BODY($url, Host => $_),
  +    ok t_cmp(GET_BODY($url, Host => $_),
  +             $_,
                "VirtalDocumentRoot test"
               );
   
  @@ -92,8 +92,8 @@
       my $cgi_uri = "/cgi-bin/$cgi_name.$ext";
       my $actual  = GET_BODY $cgi_uri, Host => $_;
       $actual =~ s/[\r\n]+$//;
  -    ok t_cmp("$cgi_string $_",
  -             $actual,
  +    ok t_cmp($actual,
  +             "$cgi_string $_",
                "VirtualScriptAlias test"
               );
   }
  
  
  
  1.7       +2 -2      httpd-test/perl-framework/t/php/arg.t
  
  Index: arg.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/arg.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- arg.t	4 Aug 2004 15:29:13 -0000	1.6
  +++ arg.t	30 Sep 2004 14:54:40 -0000	1.7
  @@ -28,7 +28,7 @@
   chop($testargs); ## get rid of trailing '+'
   
   my $result = GET_BODY "/php/arg.php?$testargs";
  -ok t_cmp($expected,
  -         $result,
  +ok t_cmp($result,
  +         $expected,
            "GET request for /php/arg.php?$testargs"
           );
  
  
  
  1.13      +4 -4      httpd-test/perl-framework/t/php/func5.t
  
  Index: func5.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/func5.t,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- func5.t	4 Aug 2004 15:29:13 -0000	1.12
  +++ func5.t	30 Sep 2004 14:54:40 -0000	1.13
  @@ -16,14 +16,14 @@
   EXPECT
   
   my $result = GET_BODY "/php/func5.php?$file";
  -ok t_cmp($expected,
  -         $result,
  +ok t_cmp($result,
  +         $expected,
            "GET request for /php/func5.php?$file"
           );
   
   sleep 1;
  -ok t_cmp(1,
  -         -e $file,
  +ok t_cmp(-e $file,
  +         1,
            "$file exists"
           );
   
  
  
  
  1.3       +2 -2      httpd-test/perl-framework/t/php/getenv.t
  
  Index: getenv.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/getenv.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- getenv.t	4 Aug 2004 15:29:14 -0000	1.2
  +++ getenv.t	30 Sep 2004 14:54:40 -0000	1.3
  @@ -9,7 +9,7 @@
   
   # Regression test for http://bugs.php.net/bug.php?id=19840
   
  -ok t_cmp("GET",
  -         GET_BODY "/php/getenv.php",
  +ok t_cmp((GET_BODY "/php/getenv.php"),
  +         "GET",
            "getenv(REQUEST_METHOD)"
   );
  
  
  
  1.3       +1 -1      httpd-test/perl-framework/t/php/getlastmod.t
  
  Index: getlastmod.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/getlastmod.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- getlastmod.t	4 Aug 2004 15:29:14 -0000	1.2
  +++ getlastmod.t	30 Sep 2004 14:54:40 -0000	1.3
  @@ -16,7 +16,7 @@
   my $month = strftime "%B", gmtime($mtime);
   
   ok t_cmp(
  -    $month,
       GET_BODY("/php/getlastmod.php"),
  +    $month,
       "getlastmod()"
   );
  
  
  
  1.3       +1 -1      httpd-test/perl-framework/t/php/ifmodsince.t
  
  Index: ifmodsince.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/ifmodsince.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ifmodsince.t	4 Aug 2004 15:29:14 -0000	1.2
  +++ ifmodsince.t	30 Sep 2004 14:54:40 -0000	1.3
  @@ -14,9 +14,9 @@
   # header; http://bugs.php.net/bug.php?id=17098
   
   ok t_cmp(
  -    200,
       GET_RC("/php/hello.php",
           "If-Modified-Since" => strftime("%a, %d %b %Y %T GMT", gmtime)),
  +    200,
       "not 304 if the php file has not been modified since If-Modified-Since"
   );
   
  
  
  
  1.3       +1 -1      httpd-test/perl-framework/t/php/umask.t
  
  Index: umask.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/umask.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- umask.t	4 Aug 2004 15:29:15 -0000	1.2
  +++ umask.t	30 Sep 2004 14:54:40 -0000	1.3
  @@ -14,6 +14,6 @@
   foreach my $n (1..4) {
       my $try = GET_BODY "/php/umask.php";
   
  -    ok t_cmp($first, $try, "umask was $try not $first for request $n");
  +    ok t_cmp($try, $first, "umask was $try not $first for request $n");
   }
   
  
  
  
  1.7       +4 -4      httpd-test/perl-framework/t/php/var1.t
  
  Index: var1.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/var1.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- var1.t	4 Aug 2004 15:29:15 -0000	1.6
  +++ var1.t	30 Sep 2004 14:54:40 -0000	1.7
  @@ -23,14 +23,14 @@
   #print STDERR "\n\n$return\n\n";
   #ok $return eq $expected;
   my $return = POST_BODY $page, content => "variable=$data";
  -ok t_cmp($expected,
  -         $return,
  +ok t_cmp($return,
  +         $expected,
            "POST request for $page, content=\"variable=$data\""
           );
   
   ## GET
   $return = GET_BODY "$page?variable=$data";
  -ok t_cmp($expected,
  -         $return,
  +ok t_cmp($return,
  +         $expected,
            "GET request for $page?variable=$data"
           );
  
  
  
  1.7       +4 -4      httpd-test/perl-framework/t/php/var2.t
  
  Index: var2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/var2.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- var2.t	4 Aug 2004 15:29:15 -0000	1.6
  +++ var2.t	30 Sep 2004 14:54:40 -0000	1.7
  @@ -21,14 +21,14 @@
   
   ## POST
   my $return = POST_BODY $page, content => $data;
  -ok t_cmp($expected,
  -         $return,
  +ok t_cmp($return,
  +         $expected,
            "POST request for $page, content=\"$data\""
           );
   
   ## GET
   $return = GET_BODY "$page?$data";
  -ok t_cmp($expected,
  -         $return,
  +ok t_cmp($return,
  +         $expected,
            "GET request for $page?$data"
           );
  
  
  
  1.7       +4 -4      httpd-test/perl-framework/t/php/var3.t
  
  Index: var3.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/var3.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- var3.t	4 Aug 2004 15:29:15 -0000	1.6
  +++ var3.t	30 Sep 2004 14:54:40 -0000	1.7
  @@ -22,14 +22,14 @@
   
   ## POST
   my $return = POST_BODY $page, content => $data;
  -ok t_cmp($expected,
  -         $return,
  +ok t_cmp($return,
  +         $expected,
            "POST request for $page, content=\"$data\""
           );
   
   ## GET
   $return = GET_BODY "$page?$data";
  -ok t_cmp($expected,
  -         $return,
  +ok t_cmp($return,
  +         $expected,
            "GET request for $page?$data"
           );
  
  
  
  1.4       +1 -1      httpd-test/perl-framework/t/protocol/echo.t
  
  Index: echo.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/protocol/echo.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- echo.t	7 Aug 2004 02:15:50 -0000	1.3
  +++ echo.t	30 Sep 2004 14:54:40 -0000	1.4
  @@ -34,6 +34,6 @@
           $sock->print("$data\n");
   
           chomp(my $response = Apache::TestRequest::getline($sock));
  -        ok t_cmp($data, $response, 'echo');
  +        ok t_cmp($response, $data, 'echo');
       }
   }
  
  
  
  1.7       +6 -6      httpd-test/perl-framework/t/ssl/basicauth.t
  
  Index: basicauth.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/ssl/basicauth.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- basicauth.t	4 Aug 2004 15:44:11 -0000	1.6
  +++ basicauth.t	30 Sep 2004 14:54:40 -0000	1.7
  @@ -17,17 +17,17 @@
   
   Apache::TestRequest::scheme('https');
   
  -ok t_cmp (500,
  -          GET_RC($url, cert => undef),
  +ok t_cmp (GET_RC($url, cert => undef),
  +          500,
             "Getting $url with no cert"
            );
   
  -ok t_cmp (200,
  -          GET_RC($url, cert => 'client_snakeoil'),
  +ok t_cmp (GET_RC($url, cert => 'client_snakeoil'),
  +          200,
             "Getting $url with client_snakeoil cert"
            );
   
  -ok t_cmp (401,
  -          GET_RC($url, cert => 'client_ok'),
  +ok t_cmp (GET_RC($url, cert => 'client_ok'),
  +          401,
             "Getting $url with client_ok cert"
            );
  
  
  
  1.13      +2 -2      httpd-test/perl-framework/t/ssl/http.t
  
  Index: http.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/ssl/http.t,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- http.t	12 Jul 2004 16:44:47 -0000	1.12
  +++ http.t	30 Sep 2004 14:54:40 -0000	1.13
  @@ -35,8 +35,8 @@
   if ($proto and $proto eq "HTTP/0.9") {
       skip "server gave HTTP/0.9 response";
   } else {    
  -    ok t_cmp(400,
  -             $res->code,
  +    ok t_cmp($res->code,
  +             400,
                "Expected bad request from 'GET $rurl'"
               );
   }
  
  
  
  1.12      +2 -2      httpd-test/perl-framework/t/ssl/proxy.t
  
  Index: proxy.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/ssl/proxy.t,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- proxy.t	17 Aug 2004 17:14:25 -0000	1.11
  +++ proxy.t	30 Sep 2004 14:54:40 -0000	1.12
  @@ -50,8 +50,8 @@
       };
   
       sok {
  -        t_cmp(200, 
  -              GET('/modules/cgi/nph-foldhdr.pl')->code,
  +        t_cmp(GET('/modules/cgi/nph-foldhdr.pl')->code,
  +              200,
                 "CGI script with folded headers");
       };
   
  
  
  

Mime
View raw message