Log a message right before exiting gracefully
[privoxy.git] / regression-tests.action
index a1bc8e3..9f81263 100644 (file)
@@ -1,9 +1,10 @@
 #############################################################################
 #
 # This is a configuration file for Privoxy-Regression-Test
-# (included in the source tarball's tools directory).
+# (included in the source tarball's tools directory and available at
+# https://www.privoxy.org/gitweb/?p=privoxy.git;a=blob;f=tools/privoxy-regression-test.pl;hb=HEAD).
 #
-# After referencing it in your Privoxy configuration both Privoxy and
+# After referencing this file in your Privoxy configuration both Privoxy and
 # Privoxy-Regression-Test should be good to go.
 #
 #############################################################################
@@ -25,7 +26,7 @@
 #############################################################################
 
 {{settings}}
-for-privoxy-version=3.0.27
+for-privoxy-version=3.0.29
 
 # Some dependencies Privoxy-Regression-Test should know about:
 #
@@ -47,6 +48,7 @@ for-privoxy-version=3.0.27
 # Level 23 needs = config line enable-proxy-authentication-forwarding\s+1
 # Level 24 needs = feature status FEATURE_CLIENT_TAGS Yes
 # Level 25 needs = feature status FEATURE_HTTPS_INSPECTION No
+# Level 26 needs = feature status FEATURE_PCRE_HOST_PATTERNS Yes
 
 #######################################################
 # Enable taggers to activate the tests on demand
@@ -106,7 +108,10 @@ TAG:^hide-accept-language\{block\}$
 # Set Header    = Referer: http://
 # Expect Header = REMOVAL
 #
-# Set Header    = Referer: https://p.p/
+# Set Header    = Referer: https://www.privoxy.org/
+# Expect Header = REMOVAL
+#
+# Set Header    = Referer: http://www.privoxy.org/
 # Expect Header = REMOVAL
 TAG:^hide-referrer\{conditional-block\}$
 
@@ -126,7 +131,10 @@ TAG:^hide-referrer\{conditional-block\}$
 # Set Header    = Referer: http://
 # Expect Header = Referer: http://p.p/
 #
-# Set Header    = Referer: https://p.p/
+# Set Header    = Referer: https://www.privoxy.org/
+# Expect Header = Referer: http://p.p/
+#
+# Set Header    = Referer: http://www.privoxy.org/
 # Expect Header = Referer: http://p.p/
 TAG:^hide-referrer\{conditional-forge\}$
 
@@ -210,6 +218,28 @@ TAG:^add-header\{X-Custom-Header: yes, please\}$
 # Expect Header = Referer: http://config.privoxy.org/foo/baaz.html
 TAG:^client-header-filter\{hide-tor-exit-notation\}$
 
+#######################################################
+# Test client-header-filter{no-brotli-accepted}.
+#######################################################
+
+{+client-header-filter{no-brotli-accepted}}
+# Set Header    = Accept-Encoding: gzip, deflate, br
+# Expect Header = Accept-Encoding: gzip, deflate
+#
+# Set Header    = Accept-Encoding: gzip, br, deflate
+# Expect Header = Accept-Encoding: gzip, deflate
+#
+# Set Header    = Accept-Encoding: br, gzip, deflate
+# Expect Header = Accept-Encoding: gzip, deflate
+#
+# Set Header    = Accept-Encoding: br
+# Expect Header = Accept-Encoding:
+#
+# Set Header    = Accept-Encoding: gzip, deflate
+# Expect Header = NO CHANGE
+#
+TAG:^client-header-filter\{no-brotli-accepted\}$
+
 #######################################################
 # Test crunch-client-header{}.
 #######################################################
@@ -582,6 +612,11 @@ TAG:^Connection: close$
 TAG:^connection-sharing disabled$
 
 {}
+# XXX: This test is expected to fail when using "https://p.p/"
+#      as CGI prefix with https inspection enabled but can't
+#      yet be automatically skipped. By design connections aren't
+#      shared when using "https://" so Privoxy does not remove the
+#      header.
 # Set Header    = Connection: close
 # Expect Header = REMOVAL
 # Level = 16
@@ -600,6 +635,15 @@ TAG:^connection-sharing enabled$
 TAG:^No Host header$
 
 {}
+# XXX: This test is expected to fail when using "https://p.p/"
+#      as CGI prefix with https inspection enabled but can't
+#      yet be automatically skipped. The reason for the test
+#      failure is that Privoxy-Regression-Test only modifies
+#      the Host header for the CONNECT request, not for the
+#      actual request that follows. Changing that would not
+#      fix the test though as a modified Host header in the
+#      actual request would result in Privoxy attempting to
+#      connect to it.
 # Set Header    = Host: whatever.example.org
 # Expect Header = NO CHANGE
 TAG:^Host header other than the target host$
@@ -1090,3 +1134,11 @@ redirect2.example.net/
 {+delay-response{1}}
 # Fetch Test = http://config.privoxy.org/show-url-info?url=http%3A%2F%2Fwww.example.com%2Fprivoxy-test-delay-response
 config.privoxy.org/show-url-info\?url=http%3A%2F%2Fwww\.example\.com%2Fprivoxy-test-delay-response
+
+{+block{Block with pcre host pattern}}
+# Blocked URL = http://aaa.example.org/
+# Level = 26
+PCRE-HOST-PATTERN:^a{3}\.example\.org$
+# Blocked URL = http://bbb.example.org/
+# Level = 26
+PCRE-HOST-PATTERN:^(bbb|ccc|ddd)\.example\.org$