diff options
author | Ben Straub <bs@github.com> | 2013-11-14 14:05:52 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-11-14 14:05:52 -0800 |
commit | 1782038144ef3413831801bb9c2f3038a84ac6f4 (patch) | |
tree | f074cc30890a20f5418c10fae1815ca516588a27 /tests-clar/refs/listall.c | |
parent | 7b947bf5cc59eefa83c28eb5f5fd8434207ebb8b (diff) | |
download | libgit2-1782038144ef3413831801bb9c2f3038a84ac6f4.tar.gz |
Rename tests-clar to tests
Diffstat (limited to 'tests-clar/refs/listall.c')
-rw-r--r-- | tests-clar/refs/listall.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/tests-clar/refs/listall.c b/tests-clar/refs/listall.c deleted file mode 100644 index c696fbb2e..000000000 --- a/tests-clar/refs/listall.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "clar_libgit2.h" -#include "posix.h" - -static git_repository *repo; -static git_strarray ref_list; - -static void ensure_no_refname_starts_with_a_forward_slash(const char *path) -{ - size_t i; - - cl_git_pass(git_repository_open(&repo, path)); - cl_git_pass(git_reference_list(&ref_list, repo)); - - cl_assert(ref_list.count > 0); - - for (i = 0; i < ref_list.count; i++) - cl_assert(git__prefixcmp(ref_list.strings[i], "/") != 0); - - git_strarray_free(&ref_list); - git_repository_free(repo); -} - -void test_refs_listall__from_repository_opened_through_workdir_path(void) -{ - cl_fixture_sandbox("status"); - cl_git_pass(p_rename("status/.gitted", "status/.git")); - - ensure_no_refname_starts_with_a_forward_slash("status"); - - cl_fixture_cleanup("status"); -} - -void test_refs_listall__from_repository_opened_through_gitdir_path(void) -{ - ensure_no_refname_starts_with_a_forward_slash(cl_fixture("testrepo.git")); -} - -void test_refs_listall__from_repository_with_no_trailing_newline(void) -{ - cl_git_pass(git_repository_open(&repo, cl_fixture("bad_tag.git"))); - cl_git_pass(git_reference_list(&ref_list, repo)); - - cl_assert(ref_list.count > 0); - - git_strarray_free(&ref_list); - git_repository_free(repo); -} |