-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue of sf_getenv_s on Windows with environment variable not bei…
…ng set
- Loading branch information
1 parent
cfac794
commit 1db6eb6
Showing
2 changed files
with
4 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,8 +66,6 @@ void test_proxy_empty(void **unused) | |
|
||
void test_allproxy_noproxy_fromenv(void **unused) | ||
{ | ||
SKIP_IF_PROXY_ENV_IS_SET; | ||
|
||
sf_setenv("all_proxy", "https://someuser:[email protected]:5050"); | ||
sf_setenv("no_proxy", "proxyserver.com"); | ||
test_proxy_parts_equality("", "someuser", "somepwd", "somewhere.com", 5050, Proxy::Protocol::HTTPS, "proxyserver.com", true); | ||
|
@@ -77,26 +75,20 @@ void test_allproxy_noproxy_fromenv(void **unused) | |
|
||
void test_httpsproxy_fromenv(void **unused) | ||
{ | ||
SKIP_IF_PROXY_ENV_IS_SET; | ||
|
||
sf_setenv("https_proxy", "https://someuser:[email protected]:5050"); | ||
test_proxy_parts_equality("", "someuser", "somepwd", "somewhere.com", 5050, Proxy::Protocol::HTTPS, "", true); | ||
sf_unsetenv("https_proxy"); | ||
} | ||
|
||
void test_httpproxy_fromenv(void **unused) | ||
{ | ||
SKIP_IF_PROXY_ENV_IS_SET; | ||
|
||
sf_setenv("http_proxy", "http://username:[email protected]:80"); | ||
test_proxy_parts_equality("", "username", "password", "proxyserver.company.com", 80, Proxy::Protocol::HTTP, "", true); | ||
sf_unsetenv("http_proxy"); | ||
} | ||
|
||
void test_noproxy_fromenv(void **unused) | ||
{ | ||
SKIP_IF_PROXY_ENV_IS_SET; | ||
|
||
sf_setenv("NO_PROXY", "proxyserver.company.com"); | ||
test_proxy_parts_equality("", "", "", "", 0, Proxy::Protocol::NONE, "proxyserver.company.com", true); | ||
sf_unsetenv("NO_PROXY"); | ||
|