diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-10-02 13:45:24 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-10-02 16:19:40 +0200 |
commit | 3574ae83ea3d77a3c8c92c7c7ab0d438304c5ab5 (patch) | |
tree | e3f7ab169a2732046ae3ced95adf5fd66fb48095 /tests/runtests.pl | |
parent | ddecd28268b78ae3361bc010c719446d55a8f894 (diff) | |
download | curl-3574ae83ea3d77a3c8c92c7c7ab0d438304c5ab5.tar.gz |
runtests: provide curl's version string as %VERSION for tests
... so that we can check HTTP requests for User-Agent: curl/%VERSION
Update 600+ test cases accordingly.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 325522182..db10c8e93 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -163,6 +163,7 @@ my $TELNETPORT=$noport; # TELNET server port with negotiation my $HTTPUNIXPATH; # HTTP server Unix domain socket path my $SSHSRVMD5 = "[uninitialized]"; # MD5 of ssh server public key +my $VERSION; # curl's reported version number my $srcdir = $ENV{'srcdir'} || '.'; my $CURL="../src/curl".exe_ext('TOOL'); # what curl executable to run on the tests @@ -2863,8 +2864,9 @@ sub checksystem { for(@version) { chomp; - if($_ =~ /^curl/) { + if($_ =~ /^curl ([^ ]*)/) { $curl = $_; + $VERSION = $1; $curl =~ s/^(.*)(libcurl.*)/$1/g; $libcurl = $2; @@ -3261,6 +3263,7 @@ sub subVariables { $$thing =~ s/${prefix}CURL/$CURL/g; $$thing =~ s/${prefix}PWD/$pwd/g; $$thing =~ s/${prefix}POSIX_PWD/$posix_pwd/g; + $$thing =~ s/${prefix}VERSION/$VERSION/g; my $file_pwd = $pwd; if($file_pwd !~ /^\//) { @@ -4191,6 +4194,10 @@ sub singletest { for(@strip) { # strip off all lines that match the patterns from both arrays chomp $_; + if($_ =~ /User-Agent/) { + # temp hack + next; + } @out = striparray( $_, \@out); @protstrip= striparray( $_, \@protstrip); } |