- `%SSHPORT` - Port number of the SCP/SFTP server
- `%SSHSRVMD5` - MD5 of SSH server's public key
- `%SSH_PWD` - Current directory friendly for the SSH server
+- `%TESTNUMBER` - Number of the test case
- `%TFTP6PORT` - IPv6 port number of the TFTP server
- `%TFTPPORT` - Port number of the TFTP server
- `%USER` - Login ID of the user running the test
test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 \
test1160 test1161 test1162 test1163 test1164 test1165 test1166 test1167 \
test1168 test1169 test1170 test1171 test1172 test1173 test1174 test1175 \
-test1176 test1177 test1178 test1179 test1180 test1181 test1182 \
+test1176 test1177 test1178 test1179 test1180 test1181 test1182 test1183 \
\
test1188 \
\
--- /dev/null
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK\r
+Server: Blafasel/5.0\r
+Date: Sat, 16 Jan 2021 14:48:30 GMT\r
+Content-Length: 12\r
+\r
+Bla bla bla
+</data>
+
+</reply>
+
+# Client-side
+<client>
+<server>
+http
+</server>
+<features>
+proxy
+</features>
+ <name>
+%TESTNUMBER used instead of actual test number
+ </name>
+ <command>
+http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+</command>
+</client>
+
+# Verify that the %TESTNUMBER has been resolved to 1183
+<verify>
+<protocol>
+GET /1183 HTTP/1.1\r
+Host: %HOSTIP:%HTTPPORT\r
+User-Agent: curl/%VERSION\r
+Accept: */*\r
+\r
+</protocol>
+</verify>
+</testcase>
# a command, in either case passed by reference
#
sub subVariables {
- my ($thing, $prefix) = @_;
+ my ($thing, $testnum, $prefix) = @_;
if(!$prefix) {
$prefix = "%";
$$thing =~ s/${prefix}PWD/$pwd/g;
$$thing =~ s/${prefix}POSIX_PWD/$posix_pwd/g;
$$thing =~ s/${prefix}VERSION/$VERSION/g;
+ $$thing =~ s/${prefix}TESTNUMBER/$testnum/g;
my $file_pwd = $pwd;
if($file_pwd !~ /^\//) {
# etc. Returns the processed version of the array
sub prepro {
+ my $testnum = shift;
my (@entiretest) = @_;
my $show = 1;
my @out;
next;
}
if($show) {
- subVariables(\$s, "%");
+ subVariables(\$s, $testnum, "%");
subBase64(\$s);
subNewlines(\$s) if($has_hyper);
push @out, $s;
my @entiretest = fulltest();
my $otest = "log/test$testnum";
- @entiretest = prepro(@entiretest);
+ @entiretest = prepro($testnum, @entiretest);
# save the new version
open(D, ">$otest");
# preprocess the input to make conditionally disabled tests depending
# on variables
- my @pp = prepro(@input);
+ my @pp = prepro(0, @input);
for my $t (@pp) {
if($t =~ /(\d+)/) {
my ($n) = $1;