]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: allow comments in `setenv` section, merge sections in test433
authorViktor Szakats <commit@vsz.me>
Sat, 25 Jul 2026 12:18:07 +0000 (14:18 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 26 Jul 2026 14:43:18 +0000 (16:43 +0200)
Closes #22389

tests/data/test433
tests/runner.pm

index 85cf29ee49679590835cf635bf50067924ec3c1b..1ef5e804451c0c4fc4d99198a8423b6a6d1e530a 100644 (file)
@@ -31,14 +31,12 @@ http
 XDG_CONFIG_HOME=%PWD/%LOGDIR
 HOME
 CURL_HOME
+# set the terminal wide to avoid word wrap in the message
+COLUMNS=300
 </setenv>
 <name>
 Verify XDG_CONFIG_HOME use to find curlrc
 </name>
-# set the terminal wide to avoid word wrap in the message
-<setenv>
-COLUMNS=300
-</setenv>
 <command option="no-q">
 %HOSTIP:%HTTPPORT/%TESTNUMBER --no-progress-meter
 </command>
index 7cbc5067e1c1e57fc681d72730121e6a09d10c64..230a688bd081d5ef059982172420241149af4d29 100644 (file)
@@ -665,7 +665,7 @@ sub singletest_setenv {
     my @setenv = getpart("client", "setenv");
     foreach my $s (@setenv) {
         chomp $s;
-        if($s =~ /([^=]*)(.*)/) {
+        if($s !~ /^#/ && $s =~ /([^=]*)(.*)/) {
             my ($var, $content) = ($1, $2);
             # remember current setting, to restore it once test runs
             $oldenv{$var} = $ENV{$var} ? $ENV{$var} : 'notset';