Commit 31e32ddf35b0710fa528cfc1b7c67c5697207a66

Mathieu Parent 2021-09-14T09:34:25

Add test to ensure empty proxy env behaves like unset env Signed-off-by: Mathieu Parent <math.parent@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests/remote/httpproxy.c b/tests/remote/httpproxy.c
index 097db4c..00115a8 100644
--- a/tests/remote/httpproxy.c
+++ b/tests/remote/httpproxy.c
@@ -136,4 +136,8 @@ void test_remote_httpproxy__env(void)
 	/* configuration overrides environment variables */
 	cl_setenv("NO_PROXY", "github.none");
 	assert_config_match("http.https://github.com.proxy", "http://localhost:11/");
+
+	/* empty env behaves like unset env */
+	cl_setenv("HTTPS_PROXY", "");
+	assert_proxy_is(NULL);
 }