summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2021-09-14 09:34:25 +0200
committerGitHub <noreply@github.com>2021-09-14 09:34:25 +0200
commit31e32ddf35b0710fa528cfc1b7c67c5697207a66 (patch)
tree42d5536c55bc85f7f204d8e6408995bf73ae7119
parentf1b89a201e9329e6df48f8d6cf320781570c936a (diff)
downloadlibgit2-31e32ddf35b0710fa528cfc1b7c67c5697207a66.tar.gz
Add test to ensure empty proxy env behaves like unset env
Signed-off-by: Mathieu Parent <math.parent@gmail.com>
-rw-r--r--tests/remote/httpproxy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/remote/httpproxy.c b/tests/remote/httpproxy.c
index 097db4cd5..00115a812 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);
}