Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df19219

Browse files
committed
Merge pull request libgit2#2408 from phkelley/win32_test_fixes
Win32 test fixes
2 parents 716e20b + daf2a64 commit df19219

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/online/clone.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ void test_online_clone__clone_mirror(void)
194194
git_remote_free(remote);
195195
git_reference_free(head);
196196
git_buf_free(&path);
197+
git_repository_free(g_repo);
198+
g_repo = NULL;
199+
197200
cl_fixture_cleanup("./foo.git");
198201
}
199202

tests/submodule/submodule_helpers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ void rewrite_gitmodules(const char *workdir)
1919
cl_git_pass(git_buf_joinpath(&in_f, workdir, "gitmodules"));
2020
cl_git_pass(git_buf_joinpath(&out_f, workdir, ".gitmodules"));
2121

22-
cl_assert((in = fopen(in_f.ptr, "r")) != NULL);
23-
cl_assert((out = fopen(out_f.ptr, "w")) != NULL);
22+
cl_assert((in = fopen(in_f.ptr, "rb")) != NULL);
23+
cl_assert((out = fopen(out_f.ptr, "wb")) != NULL);
2424

2525
while (fgets(line, sizeof(line), in) != NULL) {
2626
char *scan = line;

0 commit comments

Comments
 (0)