X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=tools%2Fprivoxy-regression-test.pl;h=986279e148a9908962a2bcd1bc8446f0d02af440;hb=9aab4f1de40af66249f84c38627be826dcaddd09;hp=61f1b0ab8fdfae0afca88bb03902949e0df3bbdd;hpb=94e2665a6017d3dc9585ae1330481883863374e5;p=privoxy.git diff --git a/tools/privoxy-regression-test.pl b/tools/privoxy-regression-test.pl index 61f1b0ab..986279e1 100755 --- a/tools/privoxy-regression-test.pl +++ b/tools/privoxy-regression-test.pl @@ -7,7 +7,7 @@ # A regression test "framework" for Privoxy. For documentation see: # perldoc privoxy-regression-test.pl # -# $Id: privoxy-regression-test.pl,v 1.159 2008/08/22 16:53:06 fk Exp $ +# $Id: privoxy-regression-test.pl,v 1.161 2008/10/25 15:44:26 fk Exp $ # # Wish list: # @@ -155,9 +155,11 @@ sub load_regressions_tests () { our $privoxy_cgi_url; our @privoxy_config; + our %privoxy_features; my @actionfiles; my $curl_url = ''; my $file_number = 0; + my $feature; $curl_url .= $privoxy_cgi_url; $curl_url .= 'show-status'; @@ -176,6 +178,15 @@ sub load_regressions_tests () { my $directive = $1 . " " . $2; push (@privoxy_config, $directive); + + } elsif (m@([^<]*)@) { + + $feature = $1; + + } elsif (m@ (Yes|No) @) { + + $privoxy_features{$feature} = $1 if defined $feature; + $feature = undef; } } @@ -539,6 +550,8 @@ sub dependency_unsatisfied ($) { my $level = shift; our %dependencies; our @privoxy_config; + our %privoxy_features; + my $dependency_problem = 0; if (defined ($dependencies{$level}{'config line'})) { @@ -549,6 +562,20 @@ sub dependency_unsatisfied ($) { foreach (@privoxy_config) { $dependency_problem = 0 if (/$dependency/); + last; + } + + } elsif (defined ($dependencies{$level}{'feature status'})) { + + my $dependency = $dependencies{$level}{'feature status'}; + my ($feature, $status) = $dependency =~ /([^\s]*)\s+(Yes|No)/; + + $dependency_problem = 1; + + if (defined($privoxy_features{$feature}) + and ($privoxy_features{$feature} eq $status)) + { + $dependency_problem = 0; } } @@ -563,7 +590,12 @@ sub register_dependency ($$) { if ($dependency =~ /config line\s+(.*)/) { - $dependencies{$level}{'config line'} = $1; + $dependencies{$level}{'config line'} = $1; + + } elsif ($dependency =~ /feature status\s+(.*)/) { + + $dependencies{$level}{'feature status'} = $1; + } }