diff options
| author | Russell Belfer <arrbee@arrbee.com> | 2012-03-26 11:22:27 -0700 |
|---|---|---|
| committer | Russell Belfer <arrbee@arrbee.com> | 2012-03-26 11:22:27 -0700 |
| commit | 277e304149011bb615ae258e25492350cbfd4d46 (patch) | |
| tree | 45d51890224f8a661a15500a4831e77d0068f144 /tests-clar/status/submodules.c | |
| parent | 1db12b00532d747fa7a805a8fa8d293c58ec16d9 (diff) | |
| download | libgit2-277e304149011bb615ae258e25492350cbfd4d46.tar.gz | |
Fix handling of submodules in trees
Diffstat (limited to 'tests-clar/status/submodules.c')
| -rw-r--r-- | tests-clar/status/submodules.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests-clar/status/submodules.c b/tests-clar/status/submodules.c index ca6c2ef30..9fd4f0d5f 100644 --- a/tests-clar/status/submodules.c +++ b/tests-clar/status/submodules.c @@ -29,7 +29,7 @@ void test_status_submodules__cleanup(void) } static int -cb_status__count(const char *p, unsigned int s, void *payload) +cb_status__submodule_count(const char *p, unsigned int s, void *payload) { volatile int *count = (int *)payload; @@ -50,10 +50,10 @@ void test_status_submodules__0(void) cl_assert(git_path_isfile("submodules/.gitmodules")); cl_git_pass( - git_status_foreach(g_repo, cb_status__count, &counts) + git_status_foreach(g_repo, cb_status__submodule_count, &counts) ); - cl_assert(counts == 7); + cl_assert(counts == 6); } static const char *expected_files[] = { @@ -62,17 +62,15 @@ static const char *expected_files[] = { "deleted", "ignored", "modified", - "testrepo", "untracked" }; static unsigned int expected_status[] = { - GIT_STATUS_INDEX_NEW | GIT_STATUS_WT_MODIFIED, + GIT_STATUS_WT_MODIFIED, GIT_STATUS_INDEX_NEW, GIT_STATUS_INDEX_DELETED, GIT_STATUS_IGNORED, GIT_STATUS_WT_MODIFIED, - GIT_STATUS_INDEX_NEW, /* submodule added in index, but not committed */ GIT_STATUS_WT_NEW }; @@ -100,5 +98,5 @@ void test_status_submodules__1(void) git_status_foreach(g_repo, cb_status__match, &index) ); - cl_assert(index == 7); + cl_assert(index == 6); } |
