projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Rename "Block Test" directive to "Blocked URL".
[privoxy.git]
/
tools
/
privoxy-regression-test.pl
diff --git
a/tools/privoxy-regression-test.pl
b/tools/privoxy-regression-test.pl
index
277d433
..
7bf82c1
100755
(executable)
--- 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
#
# A regression test "framework" for Privoxy. For documentation see:
# perldoc privoxy-regression-test.pl
#
-# $Id: privoxy-regression-test.pl,v 1.11
5 2008/03/18 22:07:34
fk Exp $
+# $Id: privoxy-regression-test.pl,v 1.11
8 2008/03/19 16:15:45
fk Exp $
#
# Wish list:
#
#
# Wish list:
#
@@
-144,7
+144,7
@@
sub parse_tag ($) {
sub check_for_forbidden_characters ($) {
my $tag = shift; # XXX: also used to check values though.
sub check_for_forbidden_characters ($) {
my $tag = shift; # XXX: also used to check values though.
- my $allowed = '[-=\dA-Za-z{}:.\/();\s,+@"_%\?&]';
+ my $allowed = '[-=\dA-Za-z
~
{}:.\/();\s,+@"_%\?&]';
unless ($tag =~ m/^$allowed*$/) {
my $forbidden = $tag;
unless ($tag =~ m/^$allowed*$/) {
my $forbidden = $tag;
@@
-191,7
+191,7
@@
sub token_starts_new_test ($) {
my $token = shift;
my @new_test_directives =
my $token = shift;
my @new_test_directives =
- ('set header', 'fetch test', 'trusted cgi request', 'request header', 'method test', 'block
test
');
+ ('set header', 'fetch test', 'trusted cgi request', 'request header', 'method test', 'block
ed url
');
foreach my $new_test_directive (@new_test_directives) {
return 1 if $new_test_directive eq $token;
foreach my $new_test_directive (@new_test_directives) {
return 1 if $new_test_directive eq $token;
@@
-211,6
+211,7
@@
sub tokenize ($) {
# Reverse HTML-encoding
# XXX: Seriously imcomplete.
s@"@"@g;
# Reverse HTML-encoding
# XXX: Seriously imcomplete.
s@"@"@g;
+ s@&@&@g;
# Tokenize
if (/^\#\s*([^=:]*?)\s*[=]\s*(.*?)\s*$/) {
# Tokenize
if (/^\#\s*([^=:]*?)\s*[=]\s*(.*?)\s*$/) {
@@
-272,7
+273,7
@@
sub enlist_new_test ($$$$$$) {
$$regression_tests[$si][$ri]{'expected-status-code'} = 200;
$$regression_tests[$si][$ri]{'level'} = METHOD_TEST;
$$regression_tests[$si][$ri]{'expected-status-code'} = 200;
$$regression_tests[$si][$ri]{'level'} = METHOD_TEST;
- } elsif ($token eq 'block
test
') {
+ } elsif ($token eq 'block
ed url
') {
l(LL_FILE_LOADING, "URL to block-test: " . $value);
$$regression_tests[$si][$ri]{'type'} = BLOCK_TEST;
l(LL_FILE_LOADING, "URL to block-test: " . $value);
$$regression_tests[$si][$ri]{'type'} = BLOCK_TEST;
@@
-667,7
+668,7
@@
sub get_final_results ($) {
if (m@<br>([-+])<a.*>([^>]*)</a>( \{.*\})@) {
my $action = $1.$2;
my $value = $3;
if (m@<br>([-+])<a.*>([^>]*)</a>( \{.*\})@) {
my $action = $1.$2;
my $value = $3;
- $final_results{$action}
{$value}
;
+ $final_results{$action}
= $value
;
}
}
}
}