]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: unset some envs instead of blanking them
authorViktor Szakats <commit@vsz.me>
Tue, 22 Jul 2025 01:14:43 +0000 (03:14 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 23 Jul 2025 20:17:25 +0000 (22:17 +0200)
After 7cf8414fabc3063cc3d2121eacec4a6daa4164a8 #12862, `VAR=` no longer
removes the env variable, but sets it to an empty/blank value instead.
To remove an env, `VAR` shall be used (without the assigment operator.)

`SSL_CERT_FILE`, `CURL_HOME`, `HOME`, `XDG_CONFIG_HOME`, were added
before the change above. Make tests unset these envs again, as their
commit messages suggest, instead of blanking them. It does not change
the outcome of the tests.

Ref: 764e4f066d5719e68fa0d6b0b0d9efa0625c5c15 #8213
Ref: e992770e8d16e4be2a3da8aa2cef5cfc12e22372 #6600

Folllow-up to 7cf8414fabc3063cc3d2121eacec4a6daa4164a8 #12862
Cherry-picked from #17988
Closes #17994

13 files changed:
tests/data/test1400
tests/data/test1401
tests/data/test1402
tests/data/test1403
tests/data/test1404
tests/data/test1405
tests/data/test1406
tests/data/test1407
tests/data/test1420
tests/data/test1465
tests/data/test1481
tests/data/test433
tests/data/test436

index 190a09338e86bf06acf13c5a4c16ef9f1224ddc4..ee7a4d4ed48db7ebfbfb80da6a41c7be203aa984 100644 (file)
@@ -31,7 +31,7 @@ http
 --libcurl for simple HTTP GET
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c
index 0356697c94a84699c4d1decf543f598275dc97d3..265d99e3ebda85d55c7fc6898fc47d78b049679c 100644 (file)
@@ -39,7 +39,7 @@ cookies
 --libcurl
 </features>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c --basic -u fake:user -H "X-Files: Mulder" -H "X-Men: cyclops, iceman" -A MyUA -b chocolate=chip --proto "=http,ftp,file"
index fe81e45f3f785d9285f032074160b68384a88d1b..0c084d2878926c4556d0150b2eec322b391fde35 100644 (file)
@@ -32,7 +32,7 @@ http
 --libcurl for simple POST
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c -d "foo=bar" -d "baz=quux"
index 1141a200cfed962537d5d2246c63adb3fc7436e7..643f4424b8bf4444837b5556fbc592023d090f45 100644 (file)
@@ -32,7 +32,7 @@ http
 --libcurl for GET with query
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c -G -d "foo=bar" -d "baz=quux"
index 58bff51e170c655c77d2d663c5cf174d724d1b82..aa88eed496246b669f1c67d25e52f66da8f22931 100644 (file)
@@ -34,7 +34,7 @@ http
 --libcurl plus -F with 3 files, one with explicit type & encoder
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F name=value -F 'file=@%LOGDIR/test%TESTNUMBER.txt,%LOGDIR/test%TESTNUMBER.txt;type=magic/content;encoder=8bit,%LOGDIR/test%TESTNUMBER.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl %LOGDIR/test%TESTNUMBER.c
index cfed433d92f4bcf663d147b614c215a1696e3297..ff95450f5c935c41b70d7def90be3537d08eb4dc 100644 (file)
@@ -36,7 +36,7 @@ ftp
 --libcurl for FTP with quote ops
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -Q "NOOP 1" -Q "+NOOP 2" -Q "-NOOP 3" -Q "*FAIL" -Q "+*FAIL HARD" --libcurl %LOGDIR/test%TESTNUMBER.c
index 87b1615318a4ec84f6cbd3a1a94b0f87a64b3769..6f734aa8a7f0b9eec22e88ab29044f6d35a7c99e 100644 (file)
@@ -26,7 +26,7 @@ smtp
 --libcurl for SMTP
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <file name="%LOGDIR/test%TESTNUMBER.eml">
 From: different\r
index 4cf5629a84ee710116b8b66857f854ef81b272a9..09d8702c284bd1adf0b198afe671d7067bf103fe 100644 (file)
@@ -27,7 +27,7 @@ pop3
 --libcurl for POP3 LIST one message
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -l -u user:secret --libcurl %LOGDIR/test%TESTNUMBER.c
index d334516d071900546e07a632ee83a81d2d664a97..f93db9d5c7a7a17c2058e3c5a25a8d50cfa2b96f 100644 (file)
@@ -33,7 +33,7 @@ imap
 --libcurl for IMAP FETCH message
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user:secret --libcurl %LOGDIR/test%TESTNUMBER.c
index 53592cc1fb3750054c6ca8b0d5cc657d91d3f4c1..786d98c5a6214779998a589c3b7887add59716c1 100644 (file)
@@ -29,7 +29,7 @@ http
 --libcurl for POST with binary content
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER --libcurl %LOGDIR/test%TESTNUMBER.c --data-binary @%LOGDIR/%TESTNUMBER-upload
index 85fc8359bd612c971a0bfba8d370a39e7824d149..b6793a3bade915dcf3f0202d67709894b8f5a01c 100644 (file)
@@ -33,7 +33,7 @@ SSL
 --libcurl with TLS version options
 </name>
 <setenv>
-SSL_CERT_FILE=
+SSL_CERT_FILE
 </setenv>
 <command>
 http://moo/ --libcurl %LOGDIR/test%TESTNUMBER.c --tls-max 1.3 --proxy-tlsv1 -x http://%HOSTIP:%HTTPPORT
index f1c405634501ef7a7c4d595c856100dc8906507a..d063c431614022cbe55573d81b6dacbf84cbb570 100644 (file)
@@ -30,8 +30,8 @@ http
 </server>
 <setenv>
 XDG_CONFIG_HOME=%PWD/%LOGDIR
-HOME=
-CURL_HOME=
+HOME
+CURL_HOME
 </setenv>
 <name>
 Verify XDG_CONFIG_HOME use to find curlrc
index 762ab3f91f12766a93f483b59427627be8a2c2fe..c377cfa49ae1877c9aff36201b1e24ce32ea0f14 100644 (file)
@@ -30,7 +30,7 @@ http
 </server>
 <setenv>
 CURL_HOME=%PWD/%LOGDIR
-XDG_CONFIG_HOME=
+XDG_CONFIG_HOME
 </setenv>
 <name>
 Find .curlrc in .config/curlrc via CURL_HOME