]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: fix `mode="warn"` tests passing unconditionally, fix test 1752
authorViktor Szakats <commit@vsz.me>
Sat, 25 Jul 2026 11:43:33 +0000 (13:43 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 26 Jul 2026 20:50:50 +0000 (22:50 +0200)
Fix test 1712 to pass curl C by setting `COLUMNS` to the highest
accepted value, and adjust expected results. To avoid envs with varying
lengths of `LOGDIR` affect the outcome.

Apply the same fix to test 459, though it wasn't affected in curl CI.

Also sync up test 433 `COLUMNS` value with these two tests for
consistency.

Ref: #22381
Follow-up to 8e3a2a64d103a46508e17cde76595993de96ea6c #20666

Closes #22388

tests/data/test1712
tests/data/test433
tests/data/test459
tests/runtests.pl

index 5cdc642d0906e093aa7bf658fb340f7132f4aba3..03fc9a729092f5946f62334d58d2f021226cf5a7 100644 (file)
@@ -30,6 +30,9 @@ Funny-head: yesyes
 <server>
 http
 </server>
+<setenv>
+COLUMNS=10000
+</setenv>
 <name>
 config file with argument using single quotes
 </name>
@@ -54,8 +57,7 @@ Content-Type: application/x-www-form-urlencoded
 'arg-with-quote'
 </protocol>
 <stderr mode="warn">
-Warning: %LOGDIR/config:1 Option 'data' uses argument with leading single quote.%SP
-It is probably a mistake. Consider double quotes.
+Warning: %LOGDIR/config:1 Option 'data' uses argument with leading single quote. It is probably a mistake. Consider double quotes.
 </stderr>
 </verify>
 </testcase>
index 1ef5e804451c0c4fc4d99198a8423b6a6d1e530a..8a3cee80a1d7ca1ac8563b5292fb158bc7e21722 100644 (file)
@@ -32,7 +32,7 @@ XDG_CONFIG_HOME=%PWD/%LOGDIR
 HOME
 CURL_HOME
 # set the terminal wide to avoid word wrap in the message
-COLUMNS=300
+COLUMNS=10000
 </setenv>
 <name>
 Verify XDG_CONFIG_HOME use to find curlrc
index 91f2d67bca18ca5a9e593037853d7dece3831bea..f5649922cd866922aba66d102e2de31460c87ec0 100644 (file)
@@ -30,6 +30,9 @@ Funny-head: yesyes
 <server>
 http
 </server>
+<setenv>
+COLUMNS=10000
+</setenv>
 <name>
 config file with argument using whitespace missing quotes
 </name>
@@ -54,8 +57,7 @@ Content-Type: application/x-www-form-urlencoded
 arg
 </protocol>
 <stderr mode="warn">
-Warning: %LOGDIR/config:1 Option 'data' uses argument with unquoted whitespace.%SP
-Warning: This may cause side-effects. Consider double quotes.
+Warning: %LOGDIR/config:1 Option 'data' uses argument with unquoted whitespace. This may cause side-effects. Consider double quotes.
 </stderr>
 </verify>
 </testcase>
index d7582ded96ab5bad0092758cda37342e6ebc7f31..eee5c2950e6aaf677ce96aa9ff27a44e8dc97c18 100755 (executable)
@@ -1372,10 +1372,6 @@ sub singletest_check {
                 s/\r//;
                 s/\n/ /;
             }
-            my $v = join(@validstderr, "");
-            my $a = join(@actual, "");
-            @validstderr = $v;
-            @actual = $a;
         }
 
         if($hash{'nonewline'}) {