Fix a tokenize() regression that caused it to miss tokens with trailing comments.
authorFabian Keil <fk@fabiankeil.de>
Sun, 14 Jun 2009 14:33:01 +0000 (14:33 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sun, 14 Jun 2009 14:33:01 +0000 (14:33 +0000)
This it turn caused Privoxy-Regression-Test to always execute a test
that should only be executed if enable-edit-actions is enabled.

Looks like we need a Privoxy-Regression-Test-Regression-Test.

tools/privoxy-regression-test.pl

index 955fc87..cdb2b09 100755 (executable)
@@ -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.185 2009/06/10 16:36:42 fk Exp $
+# $Id: privoxy-regression-test.pl,v 1.186 2009/06/14 14:29:25 fk Exp $
 #
 # Wish list:
 #
@@ -225,7 +225,7 @@ sub tokenize ($) {
     s@&amp;@&@g;
 
     # Tokenize
-    if (/^\#\s*([^=:#]*?)\s*[=]\s*([^#]+)$/) {
+    if (/^\#\s*([^=:#]*?)\s*[=]\s*([^#]+)(?:#.*)?$/) {
 
         $token = $1;
         $value = $2;