privoxy-regression-test: Add --curl option to use a non-default curl binary
[privoxy.git] / tools / privoxy-regression-test.pl
index d9ca098..e1c4c5a 100755 (executable)
@@ -1456,7 +1456,7 @@ sub get_page_with_curl($) {
 
     my $parameters = shift;
     my @buffer;
-    my $curl_line = CURL;
+    my $curl_line = get_cli_option('curl');
     my $retries_left = get_cli_option('retries') + 1;
     my $failure_reason;
 
@@ -1694,6 +1694,7 @@ sub help() {
 
 Options and their default values if they have any:
     [--check-bad-ssl]
+    [--curl $cli_options{'curl'}]
     [--debug $cli_options{'debug'}]
     [--forks $cli_options{'forks'}]
     [--fuzzer-address]
@@ -1735,6 +1736,7 @@ sub init_cli_options() {
     our $log_level;
     our $proxy;
 
+    $cli_options{'curl'}      = CURL;
     $cli_options{'debug'}     = $log_level;
     $cli_options{'forks'}     = CLI_FORKS;
     $cli_options{'loops'}     = CLI_LOOPS;
@@ -1756,6 +1758,7 @@ sub parse_cli_options() {
 
     GetOptions (
         'check-bad-ssl'      => \$cli_options{'check-bad-ssl'},
+        'curl=s'             => \$cli_options{'curl'},
         'debug=i'            => \$cli_options{'debug'},
         'forks=i'            => \$cli_options{'forks'},
         'fuzzer-address=s'   => \$cli_options{'fuzzer-address'},
@@ -1898,8 +1901,8 @@ B<privoxy-regression-test> - A regression test "framework" for Privoxy.
 
 =head1 SYNOPSIS
 
-B<privoxy-regression-test> [B<--check-bad-ssl>] [B<--debug bitmask>] [B<--forks> forks]
-[B<--fuzzer-feeding>] [B<--fuzzer-feeding>] [B<--help>] [B<--level level>]
+B<privoxy-regression-test> [B<--check-bad-ssl>] [B<--curl curl>] [B<--debug bitmask>]
+[B<--forks> forks] [B<--fuzzer-feeding>] [B<--fuzzer-feeding>] [B<--help>] [B<--level level>]
 [B<--local-test-file testfile>] [B<--loops count>] [B<--max-level max-level>]
 [B<--max-time max-time>] [B<--min-level min-level>] B<--privoxy-address proxy-address>
 B<--privoxy-cgi-prefix cgi-prefix> [B<--retries retries>] [B<--test-number test-number>]
@@ -2055,6 +2058,8 @@ certificate issues. Only works if Privoxy has been compiled
 with FEATURE_HTTPS_INSPECTION, has been configured properly
 and can reach the Internet.
 
+B<--curl curl> Use a non-default curl binary.
+
 B<--debug bitmask> Add the bitmask provided as integer
 to the debug settings.