runtests: allow comments in setenv section, merge sections in test433

Closes #22389
This commit is contained in:
Viktor Szakats 2026-07-25 14:18:07 +02:00
parent 12532713d6
commit b2a5369e70
No known key found for this signature in database
2 changed files with 3 additions and 5 deletions

View 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>

View 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';