diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-02-27 22:00:49 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-02-27 22:07:20 +0100 |
| commit | f0fa1c1a73f5a19a9799c0f8b90dcd533154cb3a (patch) | |
| tree | ebe485f0d86c539b68a73418b8e3586ed9b91a73 /tests-clar | |
| parent | 155aca2da79c8cae650c4e4f387a40d8f0a66527 (diff) | |
| download | libgit2-f0fa1c1a73f5a19a9799c0f8b90dcd533154cb3a.tar.gz | |
Add revwalk glob test
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/revwalk/basic.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests-clar/revwalk/basic.c b/tests-clar/revwalk/basic.c index 5907c244..f013945f 100644 --- a/tests-clar/revwalk/basic.c +++ b/tests-clar/revwalk/basic.c @@ -117,3 +117,18 @@ void test_revwalk_basic__sorting_modes(void) cl_git_pass(test_walk(_walk, &id, GIT_SORT_TIME | GIT_SORT_REVERSE, commit_sorting_time_reverse, 1)); cl_git_pass(test_walk(_walk, &id, GIT_SORT_TOPOLOGICAL | GIT_SORT_REVERSE, commit_sorting_topo_reverse, 2)); } + +void test_revwalk_basic__glob_heads(void) +{ + int i = 0; + git_oid oid; + + cl_git_pass(git_revwalk_push_glob(_walk, "heads")); + + while (git_revwalk_next(&oid, _walk) == GIT_SUCCESS) { + i++; + } + + /* git log --branches --oneline | wc -l => 13 */ + cl_assert(i == 13); +} |
