diff options
| author | Ben Straub <bs@github.com> | 2013-01-03 07:47:51 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2013-01-03 07:47:51 -0800 |
| commit | 6fef1ab344326bbdeb45fd653e3c13c233600a35 (patch) | |
| tree | d9f7815aa40bd563625d4a8a2d03d8cff238dd9c | |
| parent | 7761ce21625564b6526b89326c14a9843a1403d4 (diff) | |
| download | libgit2-6fef1ab344326bbdeb45fd653e3c13c233600a35.tar.gz | |
Tests should clean up after themselves
| -rw-r--r-- | tests-clar/core/env.c | 2 | ||||
| -rw-r--r-- | tests-clar/index/tests.c | 1 | ||||
| -rw-r--r-- | tests-clar/network/fetchlocal.c | 1 | ||||
| -rw-r--r-- | tests-clar/odb/alternates.c | 5 | ||||
| -rw-r--r-- | tests-clar/status/worktree.c | 5 |
5 files changed, 14 insertions, 0 deletions
diff --git a/tests-clar/core/env.c b/tests-clar/core/env.c index 9eb2fe5bb..d1d98885a 100644 --- a/tests-clar/core/env.c +++ b/tests-clar/core/env.c @@ -122,6 +122,8 @@ void test_core_env__0(void) } } #endif + + cl_fixture_cleanup(*val); } git_buf_free(&path); diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c index 30a5a31fa..8359ce027 100644 --- a/tests-clar/index/tests.c +++ b/tests-clar/index/tests.c @@ -246,6 +246,7 @@ void test_index_tests__add(void) git_index_free(index); git_repository_free(repo); + cl_fixture_cleanup("myrepo"); } void test_index_tests__add_from_workdir_to_a_bare_repository_returns_EBAREPO(void) diff --git a/tests-clar/network/fetchlocal.c b/tests-clar/network/fetchlocal.c index 24949243e..48f30e7c5 100644 --- a/tests-clar/network/fetchlocal.c +++ b/tests-clar/network/fetchlocal.c @@ -33,6 +33,7 @@ void test_network_fetchlocal__complete(void) git_strarray_free(&refnames); git_remote_free(origin); git_repository_free(repo); + cl_fixture_cleanup("foo"); } void test_network_fetchlocal__partial(void) diff --git a/tests-clar/odb/alternates.c b/tests-clar/odb/alternates.c index 785d3bc84..c4b364b16 100644 --- a/tests-clar/odb/alternates.c +++ b/tests-clar/odb/alternates.c @@ -11,8 +11,13 @@ static git_repository *repo; void test_odb_alternates__cleanup(void) { + size_t i; + git_buf_free(&destpath); git_buf_free(&filepath); + + for (i=0; i<ARRAY_SIZE(paths); i++) + cl_fixture_cleanup(paths[i]); } static void init_linked_repo(const char *path, const char *alternate) diff --git a/tests-clar/status/worktree.c b/tests-clar/status/worktree.c index a1f7f8684..70fbca9e8 100644 --- a/tests-clar/status/worktree.c +++ b/tests-clar/status/worktree.c @@ -446,6 +446,7 @@ void test_status_worktree__first_commit_in_progress(void) git_index_free(index); git_repository_free(repo); + cl_fixture_cleanup("getting_started"); } @@ -595,6 +596,7 @@ void test_status_worktree__bracket_in_filename(void) git_index_free(index); git_repository_free(repo); + cl_fixture_cleanup("with_bracket"); } void test_status_worktree__space_in_filename(void) @@ -659,6 +661,7 @@ void test_status_worktree__space_in_filename(void) git_index_free(index); git_repository_free(repo); + cl_fixture_cleanup("with_space"); } static const char *filemode_paths[] = { @@ -769,6 +772,7 @@ void test_status_worktree__disable_pathspec_match(void) ); git_repository_free(repo); + cl_fixture_cleanup("pathspec"); } @@ -821,6 +825,7 @@ void test_status_worktree__new_staged_file_must_handle_crlf(void) git_config_free(config); git_index_free(index); git_repository_free(repo); + cl_fixture_cleanup("getting_started"); } void test_status_worktree__line_endings_dont_count_as_changes_with_autocrlf(void) |
