# A regression test "framework" for Privoxy. For documentation see:
# perldoc privoxy-regression-test.pl
#
-# $Id: privoxy-regression-test.pl,v 1.92 2013/03/20 11:30:45 fabiankeil Exp $
+# $Id: privoxy-regression-test.pl,v 1.95 2016/05/12 08:42:50 fabiankeil Exp $
#
# Wish list:
#
# - Document magic Expect Header values
# - Internal fuzz support?
#
-# Copyright (c) 2007-2013 Fabian Keil <fk@fabiankeil.de>
+# Copyright (c) 2007-2016 Fabian Keil <fk@fabiankeil.de>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
$privoxy_features{$feature} = $1 if defined $feature;
$feature = undef;
- } elsif (m@This is <a href="http://www.privoxy.org/">Privoxy</a> (\d+\.\d+\.\d+) on@) {
+ } elsif (m@This is <a href="https?://www.privoxy.org/">Privoxy</a> (\d+\.\d+\.\d+) on@) {
$privoxy_version = $1;
}
}
my $curl_url = quote($actionfiles[$file_number]);
my $actionfile = undef;
my $sticky_actions = undef;
+ my $level_offset = 0;
foreach (@{get_cgi_page_or_else($curl_url)}) {
next unless defined $token;
# Load regression tests
+ if ($token eq 'default level offset') {
+
+ $level_offset = $value;
+ l(LL_FILE_LOADING, "Setting default level offset to " . $level_offset);
+ }
if (token_starts_new_test($token)) {
$count++;
enlist_new_test(\@regression_tests, $token, $value, $si, $ri, $count);
$no_checks = 1; # Already validated by enlist_new_test().
+ if ($level_offset != 0) {
+ $regression_tests[$si][$ri]{'level'} += $level_offset;
+ }
}
if ($token =~ /level\s+(\d+)/i) {
connections. Use the B<--max-level> option to run them
as well.
+The "Default level offset" directive can be used to change
+the default level by a given value. This directive affects
+all tests located after it until the end of the file or a another
+"Default level offset" directive is reached. The purpose of this
+directive is to make it more convenient to skip similar tests in
+a given file without having to remove or disable the tests completely.
+
=head1 OPTIONS
B<--debug bitmask> Add the bitmask provided as integer