summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-09-22 20:44:30 +0300
committerVicent Marti <tanoku@gmail.com>2011-09-27 14:33:18 +0200
commit01d7fded1b233b6a8fcfeec4eaf00b7dc9cc7316 (patch)
tree7c830440f1da196e41a53f1056ee3d2dd197d352 /tests
parentea4dad8ec4388a155836b6427afd018f8432af9d (diff)
downloadlibgit2-01d7fded1b233b6a8fcfeec4eaf00b7dc9cc7316.tar.gz
Revert "Rewrite getenv to use Win32 version on Windows"
This reverts commit e1b86444676b70154bf8ab450d429bdef57a8276.
Diffstat (limited to 'tests')
-rw-r--r--tests/t15-config.c4
-rw-r--r--tests/t16-remotes.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/t15-config.c b/tests/t15-config.c
index b959cc95..ac2d79cf 100644
--- a/tests/t15-config.c
+++ b/tests/t15-config.c
@@ -235,7 +235,7 @@ BEGIN_TEST(config10, "a repo's config overrides the global config")
int version;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", CONFIG_BASE, 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -255,7 +255,7 @@ BEGIN_TEST(config11, "fall back to the global config")
int num;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", CONFIG_BASE, 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
diff --git a/tests/t16-remotes.c b/tests/t16-remotes.c
index b76557fb..af54f297 100644
--- a/tests/t16-remotes.c
+++ b/tests/t16-remotes.c
@@ -34,7 +34,7 @@ BEGIN_TEST(remotes0, "remote parsing works")
git_config *cfg;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -58,7 +58,7 @@ BEGIN_TEST(refspec0, "remote with refspec works")
const git_refspec *refspec = NULL;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -83,7 +83,7 @@ BEGIN_TEST(refspec1, "remote fnmatch works as expected")
const git_refspec *refspec = NULL;
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));
@@ -109,7 +109,7 @@ BEGIN_TEST(refspec2, "refspec transform")
char ref[1024] = {0};
char *old_home;
- old_home = p_getenv("HOME");
+ old_home = git__strdup(getenv("HOME"));
p_setenv("HOME", "/dev/null", 1);
must_pass(git_repository_open(&repo, REPOSITORY_FOLDER));