You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/08/13 12:02:50 UTC
svn commit: r1157364 - /httpd/test/framework/trunk/t/apache/expr.t
Author: sf
Date: Sat Aug 13 10:02:50 2011
New Revision: 1157364
URL: http://svn.apache.org/viewvc?rev=1157364&view=rev
Log:
add tests for long expressions
Modified:
httpd/test/framework/trunk/t/apache/expr.t
Modified: httpd/test/framework/trunk/t/apache/expr.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/expr.t?rev=1157364&r1=1157363&r2=1157364&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/apache/expr.t (original)
+++ httpd/test/framework/trunk/t/apache/expr.t Sat Aug 13 10:02:50 2011
@@ -190,6 +190,20 @@ if (have_min_apache_version("2.3.13")) {
));
}
+my $long_expr;
+if (have_min_apache_version("2.3.15")) {
+ # should support long expressions
+ $long_expr= 1;
+}
+push(@test_cases,
+ [("true && " x 2000) . "true" => $long_expr ? 1 : undef],
+ # longest string/regex with 2.3.15+ is 8191
+ ["-n '" . ("a" x 8191) . "'" => $long_expr ? 1 : undef],
+ ["-n '" . ("a" x 9000) . "'" => undef],
+ ["'y' =~ /" . ("a" x 8191) . "/" => $long_expr ? 0 : undef],
+ ["'y' =~ /" . ("a" x 9000) . "/x" => undef],
+);
+
plan tests => scalar(@test_cases) + 1,
need need_lwp,
need_module('mod_authz_core'),