perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestDirective env.pm perldo.pm perlloadmodule.pm perlloadmodule4.pm perlloadmodule5.pm perlloadmodule6.pm pod.pm
Date Fri, 09 Jul 2004 15:27:32 GMT
randyk      2004/07/09 08:27:32

  Modified:    t/directive perlloadmodule2.t perlloadmodule3.t perlmodule.t
                        perlrequire.t setupenv.t
               t/response/TestDirective env.pm perldo.pm perlloadmodule.pm
                        perlloadmodule4.pm perlloadmodule5.pm
                        perlloadmodule6.pm pod.pm
  Log:
  swap args to t_cmp in t/directive tests to use new
  ($received, $expected, $comment) syntax.
  
  Revision  Changes    Path
  1.3       +3 -3      modperl-2.0/t/directive/perlloadmodule2.t
  
  Index: perlloadmodule2.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/directive/perlloadmodule2.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- perlloadmodule2.t	18 Apr 2003 06:18:55 -0000	1.2
  +++ perlloadmodule2.t	9 Jul 2004 15:27:32 -0000	1.3
  @@ -13,19 +13,19 @@
       my $location = "$url?srv";
       my $expected = "srv: one two";
       my $received = GET_BODY $location;
  -    ok t_cmp($expected, $received, "access server settings");
  +    ok t_cmp($received, $expected, "access server settings");
   }
   
   {
       my $location = "$url?";
       my $expected = "dir: one two three four";
       my $received = GET_BODY $location;
  -    ok t_cmp($expected, $received, "server/dir merge");
  +    ok t_cmp($received, $expected, "server/dir merge");
   }
   
   {
       my $location = "$url/subdir";
       my $expected = "dir: one two three four five six";
       my $received = GET_BODY $location;
  -    ok t_cmp($expected, $received, "server/dir/subdir merge");
  +    ok t_cmp($received, $expected, "server/dir/subdir merge");
   }
  
  
  
  1.5       +2 -2      modperl-2.0/t/directive/perlloadmodule3.t
  
  Index: perlloadmodule3.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/directive/perlloadmodule3.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perlloadmodule3.t	18 Apr 2003 06:18:55 -0000	1.4
  +++ perlloadmodule3.t	9 Jul 2004 15:27:32 -0000	1.5
  @@ -66,7 +66,7 @@
   EOI
       my $location = "http://$hostport/$path";
       my $received = GET_BODY $location;
  -    ok t_cmp($expected, $received, "server/dir merge");
  +    ok t_cmp($received, $expected, "server/dir merge");
   }
   
   {
  @@ -94,5 +94,5 @@
   
       my $location = "http://$hostport/$path/subdir";
       my $received = GET_BODY $location;
  -    ok t_cmp($expected, $received, "server/dir/subdir merge");
  +    ok t_cmp($received, $expected, "server/dir/subdir merge");
   }
  
  
  
  1.3       +2 -2      modperl-2.0/t/directive/perlmodule.t
  
  Index: perlmodule.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/directive/perlmodule.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- perlmodule.t	18 Apr 2003 06:18:55 -0000	1.2
  +++ perlmodule.t	9 Jul 2004 15:27:32 -0000	1.3
  @@ -19,7 +19,7 @@
   my $path = Apache::TestRequest::module2path($module);
   t_debug("connecting to $hostport");
   
  -ok t_cmp($module,
  -         GET_BODY("/$path"),
  +ok t_cmp(GET_BODY("/$path"),
  +         $module,
            "testing PerlModule in $module");
   
  
  
  
  1.6       +2 -2      modperl-2.0/t/directive/perlrequire.t
  
  Index: perlrequire.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/directive/perlrequire.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- perlrequire.t	18 Apr 2003 06:18:55 -0000	1.5
  +++ perlrequire.t	9 Jul 2004 15:27:32 -0000	1.6
  @@ -26,7 +26,7 @@
       my $hostport = Apache::TestRequest::hostport($config);
       t_debug("connecting to $hostport");
   
  -    ok t_cmp($checks{$module},
  -             GET_BODY("http://$hostport/$path"),
  +    ok t_cmp(GET_BODY("http://$hostport/$path"),
  +             $checks{$module},
                "testing PerlRequire in $module");
   }
  
  
  
  1.4       +1 -1      modperl-2.0/t/directive/setupenv.t
  
  Index: setupenv.t
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/directive/setupenv.t,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- setupenv.t	18 Apr 2003 06:18:55 -0000	1.3
  +++ setupenv.t	9 Jul 2004 15:27:32 -0000	1.4
  @@ -21,6 +21,6 @@
       $env{$key} = $val || '';
   }
   
  -ok t_cmp $location, $env{REQUEST_URI}, "testing REQUEST_URI";
  +ok t_cmp $env{REQUEST_URI}, $location, "testing REQUEST_URI";
   
   ok not exists $env{HOME};
  
  
  
  1.4       +16 -16    modperl-2.0/t/response/TestDirective/env.pm
  
  Index: env.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/env.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- env.pm	12 Feb 2004 23:06:24 -0000	1.3
  +++ env.pm	9 Jul 2004 15:27:32 -0000	1.4
  @@ -17,39 +17,39 @@
       plan $r, tests => 8;
   
       # %ENV
  -    ok t_cmp('env_dir1', 
  -             env_get('srv1'),
  +    ok t_cmp(env_get('srv1'),
  +             'env_dir1', 
                '%ENV per-dir override per-srv');
   
  -    ok t_cmp('env_srv2', 
  -             env_get('srv2'),
  +    ok t_cmp(env_get('srv2'),
  +             'env_srv2',
                '%ENV per-srv');
   
  -    ok t_cmp('env_dir2', 
  -             env_get('dir2'),
  +    ok t_cmp(env_get('dir2'),
  +             'env_dir2',
                '%ENV per-dir');
   
       # setup by Apache::TestRun
  -    ok t_cmp('test.host.name',
  -             $ENV{APACHE_TEST_HOSTNAME},
  +    ok t_cmp($ENV{APACHE_TEST_HOSTNAME},
  +             'test.host.name',
                '%ENV PerlPassEnv');
   
       # $r->subprocess_env
  -    ok t_cmp('env_dir1', 
  -             env_get('srv1', $r),
  +    ok t_cmp(env_get('srv1', $r),
  +             'env_dir1',
                '$r->subprocess_env per-dir override per-srv');
   
  -    ok t_cmp('env_srv2', 
  -             env_get('srv2', $r),
  +    ok t_cmp(env_get('srv2', $r),
  +             'env_srv2',
                '$r->subprocess_env per-srv');
   
  -    ok t_cmp('env_dir2', 
  -             env_get('dir2', $r),
  +    ok t_cmp(env_get('dir2', $r),
  +             'env_dir2',
                '$r->subprocess_env per-dir');
   
       # setup by Apache::TestRun
  -    ok t_cmp('test.host.name',
  -             $r->subprocess_env->get('APACHE_TEST_HOSTNAME'),
  +    ok t_cmp($r->subprocess_env->get('APACHE_TEST_HOSTNAME'),
  +             'test.host.name',
                '$r->subprocess_env PerlPassEnv');
   
       Apache::OK;
  
  
  
  1.10      +6 -6      modperl-2.0/t/response/TestDirective/perldo.pm
  
  Index: perldo.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perldo.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- perldo.pm	3 Jul 2004 18:45:46 -0000	1.9
  +++ perldo.pm	9 Jul 2004 15:27:32 -0000	1.10
  @@ -27,11 +27,11 @@
   
       ok not exists $Location{'/perl_sections'};
       ok exists $Location{'/perl_sections_saved'};
  -    ok t_cmp('PerlSection', $Location{'/perl_sections_saved'}{'AuthName'});
  +    ok t_cmp($Location{'/perl_sections_saved'}{'AuthName'}, 'PerlSection');
   
  -    ok t_cmp('TIED', $Location{'/tied'}, 'Tied %Location');
  +    ok t_cmp($Location{'/tied'}, 'TIED', 'Tied %Location');
   
  -    ok t_cmp('yes', $TestDirective::perl::comments);
  +    ok t_cmp($TestDirective::perl::comments, 'yes', );
   
       ok t_cmp($TestDirective::perl::dollar_zero, qr/extra.last.conf/, '$0');
       ok t_cmp($TestDirective::perl::filename, qr/extra.last.conf/, '__FILE__');
  @@ -39,15 +39,15 @@
       # 3 would mean we are still counting lines from the context of the eval
       ok $TestDirective::perl::line > 3;
   
  -    ok t_cmp("-e", $0, '$0');
  +    ok t_cmp($0, "-e", '$0');
   
  -    ok t_cmp(1, $TestDirective::perl::Included, "Include");
  +    ok t_cmp($TestDirective::perl::Included, 1, "Include");
   
       my $dump = Apache::PerlSections->dump;
       ok t_cmp($dump, qr/__END__/, "Apache::PerlSections->dump");
   
       eval "package TestDirective::perldo::test;\nno strict;\n$dump";
  -    ok t_cmp("", $@, "PerlSections dump syntax check");
  +    ok t_cmp($@, "", "PerlSections dump syntax check");
   
       ok t_cmp($TestDirective::perldo::test::Include, qr/perlsection.conf/);
   
  
  
  
  1.5       +5 -5      modperl-2.0/t/response/TestDirective/perlloadmodule.pm
  
  Index: perlloadmodule.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perlloadmodule.pm	3 Jul 2004 18:45:46 -0000	1.4
  +++ perlloadmodule.pm	9 Jul 2004 15:27:32 -0000	1.5
  @@ -113,21 +113,21 @@
       ok t_cmp($r->uri, qr{^$path},
                'r->uri =~ parms->path');
   
  -    ok t_cmp($self, $srv_cfg->{name},
  +    ok t_cmp($srv_cfg->{name}, $self,
                '$self eq $srv_cfg->{name}');
   
  -    ok t_cmp('value', $dir_cfg->{MyOtherTest},
  +    ok t_cmp($dir_cfg->{MyOtherTest}, 'value',
                'MyOtherTest value');
   
  -    ok t_cmp('some info', $dir_cfg->{MyOtherTestInfo},
  +    ok t_cmp($dir_cfg->{MyOtherTestInfo}, 'some info',
                'MyOtherTest cmd_data');
   
  -    ok t_cmp(['one', 'two'], $dir_cfg->{MyTest},
  +    ok t_cmp($dir_cfg->{MyTest}, ['one', 'two'],
                'MyTest one two');
   
       ok ! $dir_cfg->{MyTestInfo};
   
  -    ok t_cmp('per-server', $srv_cfg->{ServerTest});
  +    ok t_cmp($srv_cfg->{ServerTest}, 'per-server');
   
       Apache::OK;
   }
  
  
  
  1.5       +2 -2      modperl-2.0/t/response/TestDirective/perlloadmodule4.pm
  
  Index: perlloadmodule4.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule4.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perlloadmodule4.pm	9 Jul 2004 08:01:21 -0000	1.4
  +++ perlloadmodule4.pm	9 Jul 2004 15:27:32 -0000	1.5
  @@ -67,9 +67,9 @@
   
       ok $s->is_virtual;
   
  -    ok t_cmp("Dir", $dir_cfg->{+KEY}, "Section");
  +    ok t_cmp($dir_cfg->{+KEY}, "Dir", "Section");
   
  -    ok t_cmp("Vhost", $srv_cfg->{+KEY}, "Section");
  +    ok t_cmp($srv_cfg->{+KEY}, "Vhost", "Section");
   
       return Apache::OK;
   }
  
  
  
  1.6       +2 -2      modperl-2.0/t/response/TestDirective/perlloadmodule5.pm
  
  Index: perlloadmodule5.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule5.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- perlloadmodule5.pm	9 Jul 2004 08:01:21 -0000	1.5
  +++ perlloadmodule5.pm	9 Jul 2004 15:27:32 -0000	1.6
  @@ -65,9 +65,9 @@
   
       ok $s->is_virtual;
   
  -    ok t_cmp("Dir", $dir_cfg->{+KEY}, "Section");
  +    ok t_cmp($dir_cfg->{+KEY}, "Dir", "Section");
   
  -    ok t_cmp("Vhost", $srv_cfg->{+KEY}, "Section");
  +    ok t_cmp($srv_cfg->{+KEY}, "Vhost", "Section");
   
       return Apache::OK;
   }
  
  
  
  1.5       +2 -2      modperl-2.0/t/response/TestDirective/perlloadmodule6.pm
  
  Index: perlloadmodule6.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/perlloadmodule6.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- perlloadmodule6.pm	9 Jul 2004 08:01:21 -0000	1.4
  +++ perlloadmodule6.pm	9 Jul 2004 15:27:32 -0000	1.5
  @@ -55,9 +55,9 @@
   
       ok $s->is_virtual;
   
  -    ok t_cmp("Dir", $dir_cfg->{+KEY}, "Section");
  +    ok t_cmp($dir_cfg->{+KEY}, "Dir", "Section");
   
  -    ok t_cmp("Vhost", $srv_cfg->{+KEY}, "Section");
  +    ok t_cmp($srv_cfg->{+KEY}, "Vhost", "Section");
   
       return Apache::OK;
   }
  
  
  
  1.3       +2 -2      modperl-2.0/t/response/TestDirective/pod.pm
  
  Index: pod.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestDirective/pod.pm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- pod.pm	27 Sep 2002 19:33:32 -0000	1.2
  +++ pod.pm	9 Jul 2004 15:27:32 -0000	1.3
  @@ -12,8 +12,8 @@
   
       plan $r, tests => 3;
   
  -    ok t_cmp('yes', $r->dir_config->get('TestDirective__pod_over_worked'));
  -    ok t_cmp('yes', $r->dir_config->get('TestDirective__pod_cut_worked'));
  +    ok t_cmp($r->dir_config->get('TestDirective__pod_over_worked'), 'yes');
  +    ok t_cmp($r->dir_config->get('TestDirective__pod_cut_worked'), 'yes');
   
       #XXX: How to test that __END__ works proprely without cloberring all the other tests?
       ok t_cmp('__END__', '__END__');
  
  
  

Mime
View raw message