Author: jorton
Date: Thu Mar 10 03:10:39 2005
New Revision: 156941

URL: http://svn.apache.org/viewcvs?view=rev&rev=156941
Log:
Add regression test for http://bugs.php.net/bug.php?id=31717

Added:
    httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/info.php
    httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/off/info.php
    httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/on/info.php
    httpd/test/trunk/perl-framework/t/php/pathinfo.t

Added: httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/info.php
URL: 
http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/info.php?view=auto&rev=156941
==============================================================================
--- httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/info.php 
(added)
+++ httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/info.php Thu 
Mar 10 03:10:39 2005
@@ -0,0 +1 @@
+_<?php echo $_SERVER['PATH_INFO']; ?>_
\ No newline at end of file

Added: 
httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/off/info.php
URL: 
http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/off/info.php?view=auto&rev=156941
==============================================================================
--- httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/off/info.php 
(added)
+++ httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/off/info.php 
Thu Mar 10 03:10:39 2005
@@ -0,0 +1 @@
+_<?php echo $_SERVER['PATH_INFO']; ?>_
\ No newline at end of file

Added: 
httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/on/info.php
URL: 
http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/on/info.php?view=auto&rev=156941
==============================================================================
--- httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/on/info.php 
(added)
+++ httpd/test/trunk/perl-framework/t/htdocs/apache/acceptpathinfo/on/info.php 
Thu Mar 10 03:10:39 2005
@@ -0,0 +1 @@
+_<?php echo $_SERVER['PATH_INFO']; ?>_
\ No newline at end of file

Added: httpd/test/trunk/perl-framework/t/php/pathinfo.t
URL: 
http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/php/pathinfo.t?view=auto&rev=156941
==============================================================================
--- httpd/test/trunk/perl-framework/t/php/pathinfo.t (added)
+++ httpd/test/trunk/perl-framework/t/php/pathinfo.t Thu Mar 10 03:10:39 2005
@@ -0,0 +1,22 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+use Apache::TestUtil;
+
+plan tests => 5, sub { need_php() && need_min_apache_version('2.0.0'); };
+
+my $r;
+
+$r = GET("/apache/acceptpathinfo/on/info.php/fish/food");
+ok t_cmp($r->code, 200, "PATH_INFO accepted by default");
+ok t_cmp($r->content, "_/fish/food_", "PATH_INFO parsed OK");
+
+$r = GET("/apache/acceptpathinfo/off/info.php/fish/food");
+ok t_cmp($r->code, 404, "PATH_INFO rejected if disabled");
+
+$r = GET("/apache/acceptpathinfo/on/info.php/fish/food");
+ok t_cmp($r->code, 200, "PATH_INFO accepted if enabled");
+ok t_cmp($r->content, "_/fish/food_", "PATH_INFO parsed OK");
+


Reply via email to