summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-03-17 17:45:31 -0400
committerEdward Thomson <ethomson@microsoft.com>2015-04-20 16:22:31 -0400
commit49b3ddf2167156352eabce9a169fa6649b900631 (patch)
tree6c6c847c70eadc7d3b4cf9192d760712966a9443 /tests
parent30640aa9ad574761a3a69244c6194eb626e69d40 (diff)
downloadlibgit2-49b3ddf2167156352eabce9a169fa6649b900631.tar.gz
rebase: commit should return GIT_EUNMERGED
git_rebase_commit should return `GIT_EUNMERGED` when unmerged items exist in the index, per the documentation. Test that this is correct.
Diffstat (limited to 'tests')
-rw-r--r--tests/rebase/merge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/rebase/merge.c b/tests/rebase/merge.c
index f820e96c6..e9390567e 100644
--- a/tests/rebase/merge.c
+++ b/tests/rebase/merge.c
@@ -90,7 +90,7 @@ void test_rebase_merge__next_with_conflicts(void)
git_checkout_options checkout_opts = GIT_CHECKOUT_OPTIONS_INIT;
git_status_list *status_list;
const git_status_entry *status_entry;
- git_oid pick_id;
+ git_oid pick_id, commit_id;
const char *expected_merge =
"ASPARAGUS SOUP.\n"
@@ -139,6 +139,8 @@ void test_rebase_merge__next_with_conflicts(void)
cl_assert_equal_file(expected_merge, strlen(expected_merge), "rebase/asparagus.txt");
+ cl_git_fail_with(GIT_EUNMERGED, git_rebase_commit(&commit_id, rebase, NULL, signature, NULL, NULL));
+
git_status_list_free(status_list);
git_annotated_commit_free(branch_head);
git_annotated_commit_free(upstream_head);