You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2019/11/11 09:32:58 UTC

svn commit: r1869652 - /httpd/test/framework/trunk/t/modules/headers.t

Author: jailletc36
Date: Mon Nov 11 09:32:58 2019
New Revision: 1869652

URL: http://svn.apache.org/viewvc?rev=1869652&view=rev
Log:
Add tests for env= and expr=

Modified:
    httpd/test/framework/trunk/t/modules/headers.t

Modified: httpd/test/framework/trunk/t/modules/headers.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/headers.t?rev=1869652&r1=1869651&r2=1869652&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/headers.t (original)
+++ httpd/test/framework/trunk/t/modules/headers.t Mon Nov 11 09:32:58 2019
@@ -98,6 +98,23 @@ my @testcases = (
        [ 'Test-Header' => 'foo' ],
        [ 'Test-Header' => 'foo', 'Test-Header2' => 'bar' ],
     ],
+    # env=
+    [
+       "SetEnv MY_ENV\nHeader set Test-Header foo env=MY_ENV",          # env defined
+       [  ],
+       [ 'Test-Header' => 'foo' ],
+    ],
+    [
+       "Header set Test-Header foo env=!MY_ENV",                        # env NOT defined
+       [  ],
+       [ 'Test-Header' => 'foo' ],
+    ],
+    # expr=
+    [
+       "Header set Test-Header foo \"expr=%{REQUEST_URI} =~ m#htaccess#\"", # expr
+       [  ],
+       [ 'Test-Header' => 'foo' ],
+    ],
 );
    
 plan tests =>