X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=tools%2Fprivoxy-regression-test.pl;h=69a9ee788b65e0e2d9ca8e7d922c87a796828235;hp=cb43b23041f886437223a0ac211b6792f290a63c;hb=38a58e4ea32040f89a464b1ce919200d56ebef71;hpb=4fd08341068a6d22ec669934d35c018a8b0811f4 diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index cb43b230..69a9ee78 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -7,8 +7,6 @@ # A regression test "framework" for Privoxy. For documentation see: # perldoc privoxy-regression-test.pl # -# $Id: privoxy-regression-test.pl,v 1.97 2016/05/12 08:43:04 fabiankeil Exp $ -# # Wish list: # # - Update documentation @@ -40,7 +38,7 @@ use strict; use Getopt::Long; use constant { - PRT_VERSION => 'Privoxy-Regression-Test 0.7', + PRT_VERSION => 'Privoxy-Regression-Test 0.7.1', CURL => 'curl', @@ -134,7 +132,7 @@ sub parse_tag ($) { sub check_for_forbidden_characters ($) { my $string = shift; - my $allowed = '[-=\dA-Za-z~{}:./();\t ,+@"_%?&*^]'; + my $allowed = '[-=\dA-Za-z~{}\[\]:./();\t ,+@"_%?&*^]'; unless ($string =~ m/^$allowed*$/o) { my $forbidden = $string; @@ -276,7 +274,7 @@ sub load_regression_tests_from_file ($) { l(LL_FILE_LOADING, "Sticky actions: " . $sticky_actions); $regression_tests[$si][$ri]{'sticky-actions'} = $sticky_actions; } else { - log_and_die("Sticky URL without Sticky Actions: $value"); + log_and_die("Sticky URL without Sticky Actions in $action_file: $value"); } } else { @@ -656,7 +654,7 @@ sub load_action_files ($) { l(LL_FILE_LOADING, "Sticky actions: " . $sticky_actions); $regression_tests[$si][$ri]{'sticky-actions'} = $sticky_actions; } else { - log_and_die("Sticky URL without Sticky Actions: $value"); + log_and_die("Sticky URL without Sticky Actions in $actionfile: $value"); } } else { @@ -1454,6 +1452,8 @@ sub get_page_with_curl ($) { $curl_line .= " --user-agent '" . PRT_VERSION . "' "; # We aren't too patient $curl_line .= " --max-time '" . get_cli_option('max-time') . "' "; + # We don't want curl to treat "[]", "{}" etc. special + $curl_line .= " --globoff "; $curl_line .= $parameters; # XXX: still necessary? @@ -1913,7 +1913,7 @@ To verify that requests for a URL get redirected, use: To skip a test, add the following line: -# Ignore = Yes + # Ignore = Yes The difference between a skipped test and a removed one is that removing a test affects the numbers of the following tests, while a skipped test @@ -1926,20 +1926,20 @@ is likely to get lost with the next update. Overwrite conditions are an alternative and can be added in any action file as long as the come after the test that is expected to fail. -They causes all previous tests a matching the condition to be skipped. +They cause all previous tests that match the condition to be skipped. It is recommended to put the overwrite condition below the custom Privoxy section that causes the expected test failure and before the custom test that verifies that tests the now expected behaviour. Example: -# The following section is expected to overwrite a section in -# default.action, whose effect is tested. Thus also disable the -# test that is now expected to fail and add a new one. -# -{+block{Facebook makes Firefox even more unstable. Do not want.}} -# Overwrite condition = http://apps.facebook.com/onthefarm/track.php?creative=&cat=friendvisit&subcat=weeds&key=a789a971dc687bee4c20c044834fabdd&next=index.php%3Fref%3Dnotif%26visitId%3D898835505 -# Blocked URL = http://apps.facebook.com/ -.facebook./ + # The following section is expected to overwrite a section in + # default.action, whose effect is being tested. Thus also disable + # the test that is now expected to fail and add a new one. + # + {+block{Facebook makes Firefox even more unstable. Do not want.}} + # Overwrite condition = http://apps.facebook.com/onthefarm/track.php?creative=&cat=friendvisit&subcat=weeds&key=a789a971dc687bee4c20c044834fabdd&next=index.php%3Fref%3Dnotif%26visitId%3D898835505 + # Blocked URL = http://apps.facebook.com/ + .facebook./ =head1 TEST LEVELS