diff options
| author | Greg Price <price@mit.edu> | 2013-03-03 20:54:23 -0800 |
|---|---|---|
| committer | Greg Price <price@mit.edu> | 2013-04-06 20:51:16 -0700 |
| commit | af079d8bf69a4bd92d6a4eff3c3d1e4d73190a78 (patch) | |
| tree | b4a087d5b3414c2f72836e03e3e5730d9f936e0f /tests-clar/revwalk/basic.c | |
| parent | b208d9002289dcd8170750cb94c84678afdd6e0c (diff) | |
| download | libgit2-af079d8bf69a4bd92d6a4eff3c3d1e4d73190a78.tar.gz | |
revwalk: Parse revision ranges
All the hard work is already in revparse.
Signed-off-by: Greg Price <price@mit.edu>
Diffstat (limited to 'tests-clar/revwalk/basic.c')
| -rw-r--r-- | tests-clar/revwalk/basic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests-clar/revwalk/basic.c b/tests-clar/revwalk/basic.c index 2f1f817c9..e82776260 100644 --- a/tests-clar/revwalk/basic.c +++ b/tests-clar/revwalk/basic.c @@ -38,6 +38,10 @@ static const int commit_sorting_time_reverse[][6] = { {4, 5, 2, 1, 3, 0} }; +static const int commit_sorting_segment[][6] = { + {1, 2, -1, -1, -1, -1} +}; + #define commit_count 6 static const int result_bytes = 24; @@ -192,3 +196,11 @@ void test_revwalk_basic__disallow_non_commit(void) cl_git_pass(git_oid_fromstr(&oid, "521d87c1ec3aef9824daf6d96cc0ae3710766d91")); cl_git_fail(git_revwalk_push(_walk, &oid)); } + +void test_revwalk_basic__push_range(void) +{ + git_revwalk_reset(_walk); + git_revwalk_sorting(_walk, 0); + cl_git_pass(git_revwalk_push_range(_walk, "9fd738e~2..9fd738e")); + cl_git_pass(test_walk_only(_walk, commit_sorting_segment, 1)); +} |
