runtests: support %DATE for YYYY-MM-DD of right now
This commit is contained in:
parent
348882ee79
commit
0e73b69b3d
@ -124,6 +124,7 @@ Available substitute variables include:
|
||||
- `%CLIENT6IP` - IPv6 address of the client running curl
|
||||
- `%CLIENTIP` - IPv4 address of the client running curl
|
||||
- `%CURL` - Path to the curl executable
|
||||
- `%DATE` - current YYYY-MM-DD date
|
||||
- `%FILE_PWD` - Current directory, on Windows prefixed with a slash
|
||||
- `%FTP6PORT` - IPv6 port number of the FTP server
|
||||
- `%FTPPORT` - Port number of the FTP server
|
||||
|
||||
@ -39,6 +39,7 @@ BEGIN {
|
||||
$CURL
|
||||
$CURLVERSION
|
||||
$CURLVERNUM
|
||||
$DATE
|
||||
$has_shared
|
||||
$LIBDIR
|
||||
$listonly
|
||||
|
||||
@ -60,6 +60,7 @@ use strict;
|
||||
# Promote all warnings to fatal
|
||||
use warnings FATAL => 'all';
|
||||
use 5.006;
|
||||
use POSIX qw(strftime);
|
||||
|
||||
# These should be the only variables that might be needed to get edited:
|
||||
|
||||
@ -499,6 +500,8 @@ sub checksystemfeatures {
|
||||
$versretval = runclient($versioncmd);
|
||||
$versnoexec = $!;
|
||||
|
||||
$DATE = strftime "%Y-%m-%d", localtime;
|
||||
|
||||
open(my $versout, "<", "$curlverout");
|
||||
@version = <$versout>;
|
||||
close($versout);
|
||||
|
||||
@ -2971,6 +2971,7 @@ sub subvariables {
|
||||
$$thing =~ s/${prefix}POSIX_PWD/$posix_pwd/g;
|
||||
$$thing =~ s/${prefix}VERSION/$CURLVERSION/g;
|
||||
$$thing =~ s/${prefix}VERNUM/$CURLVERNUM/g;
|
||||
$$thing =~ s/${prefix}DATE/$DATE/g;
|
||||
$$thing =~ s/${prefix}TESTNUMBER/$testnum/g;
|
||||
|
||||
my $file_pwd = $pwd;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user