You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by jo...@apache.org on 2004/10/20 15:38:16 UTC

cvs commit: httpd-test/perl-framework/t/php construct.t eval2.t func2.t func3.t func4.t if2.t include2.t param.t param2.t regression3.t stack.t umask.t

jorton      2004/10/20 06:38:16

  Modified:    perl-framework/Apache-Test/lib/Apache Test.pm
               perl-framework/t/php construct.t eval2.t func2.t func3.t
                        func4.t if2.t include2.t param.t param2.t
                        regression3.t stack.t umask.t
  Log:
  - make need_php also recognise sapi_apache2.c
  - add need_php4 to work with either sapi_apache2.c or mod_php4.c
  - adjust all the tests to use need_php4 to be PHP SAPI-agnostic.
  
  Revision  Changes    Path
  1.105     +11 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm
  
  Index: Test.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/Test.pm,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -d -w -u -r1.104 -r1.105
  --- Test.pm	15 Oct 2004 04:11:39 -0000	1.104
  +++ Test.pm	20 Oct 2004 13:38:15 -0000	1.105
  @@ -333,7 +333,11 @@
   }
   
   sub need_php {
  -    need_module('php4') || need_module('php5');
  +    need_module('php4') || need_module('php5') || need_module('sapi_apache2.c');
  +}
  +
  +sub need_php4 {
  +    need_module('php4') || need_module('sapi_apache2.c');
   }
   
   sub need_access {
  @@ -679,6 +683,12 @@
     plan tests => 5, need_php;
   
   Requires mod_php4 or mod_php5 to be installed.
  +
  +=item need_php4
  +
  +    plan tests => 5, need_php4;
  +
  +Requires mod_php4 to be installed.
   
   =item need_apache
   
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/construct.t
  
  Index: construct.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/construct.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- construct.t	4 Aug 2004 15:29:13 -0000	1.5
  +++ construct.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 2, need_module 'php4';
  +plan tests => 2, need_php4;
   
   ## testing PHP OO bug (#7515)
   ## php src:
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/eval2.t
  
  Index: eval2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/eval2.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- eval2.t	4 Aug 2004 15:29:13 -0000	1.5
  +++ eval2.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -6,7 +6,7 @@
   
   ## testing eval function inside user function
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = "Hello";
   
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/func2.t
  
  Index: func2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/func2.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- func2.t	4 Aug 2004 15:29:13 -0000	1.5
  +++ func2.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = <<EXPECT;
   hey=0, 0
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/func3.t
  
  Index: func3.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/func3.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- func3.t	4 Aug 2004 15:29:13 -0000	1.5
  +++ func3.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = <<EXPECT;
   hey
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/func4.t
  
  Index: func4.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/func4.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- func4.t	4 Aug 2004 15:29:13 -0000	1.5
  +++ func4.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = <<EXPECT;
   Before function declaration...
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/if2.t
  
  Index: if2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/if2.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- if2.t	4 Aug 2004 15:29:14 -0000	1.5
  +++ if2.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -6,7 +6,7 @@
   
   ## Testing user-defined function falling out of an If into another
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = "1\n";
   
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/include2.t
  
  Index: include2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/include2.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- include2.t	4 Aug 2004 15:29:14 -0000	1.5
  +++ include2.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -6,7 +6,7 @@
   
   ## testing user function in an nclude
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = "Hello";
   
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/param.t
  
  Index: param.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/param.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- param.t	4 Aug 2004 15:29:14 -0000	1.5
  +++ param.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $result = GET_BODY "/php/param.php";
   ok $result eq "3\n";
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/param2.t
  
  Index: param2.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/param2.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- param2.t	4 Aug 2004 15:29:14 -0000	1.5
  +++ param2.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $result = GET_BODY "/php/param2.php";
   ok $result eq "2\n";
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/regression3.t
  
  Index: regression3.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/regression3.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- regression3.t	4 Aug 2004 15:29:14 -0000	1.5
  +++ regression3.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -4,7 +4,7 @@
   use Apache::Test;
   use Apache::TestRequest;
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = <<EXPECT;
    0  a  1  a  2  a  3  a  4  a  5  a  6  a  7  a  8  a  9 
  
  
  
  1.6       +1 -1      httpd-test/perl-framework/t/php/stack.t
  
  Index: stack.t
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/t/php/stack.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -d -w -u -r1.5 -r1.6
  --- stack.t	4 Aug 2004 15:29:14 -0000	1.5
  +++ stack.t	20 Oct 2004 13:38:15 -0000	1.6
  @@ -6,7 +6,7 @@
   
   ## testing stack after early function return
   
  -plan tests => 1, need_module 'php4';
  +plan tests => 1, need_php4;
   
   my $expected = "HelloHello";
   
  
  
  
  1.4       +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.3
  retrieving revision 1.4
  diff -d -w -u -r1.3 -r1.4
  --- umask.t	30 Sep 2004 14:54:40 -0000	1.3
  +++ umask.t	20 Oct 2004 13:38:15 -0000	1.4
  @@ -7,7 +7,7 @@
   
   ## test that umask() is reset after script execution
   
  -plan tests => 4, need_module 'php4';
  +plan tests => 4, need_php4;
   
   my $first = GET_BODY "/php/umask.php";