[PATCH 19/23] rebasing: add tests
---
t/t1520-test.sh | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/t/t1520-test.sh b/t/t1520-test.sh
index a18c1d7..1db3598 100755
--- a/t/t1520-test.sh
+++ b/t/t1520-test.sh
@@ -468,4 +468,39 @@ test_expect_success 'git test --not-conflicted # should fail when there are conf
'
+test_expect_success 'git test --rebasing # should fail' \
+'
+ test_must_fail git test --rebasing
+'
+
+test_expect_success 'git test --not-rebasing' \
+'
+ git test --not-rebasing
+'
+
+test_expect_success 'git test --rebasing' \
+'
+ test_when_finished "
+ git reset --hard HEAD &&
+ git checkout -f master &&
+ git branch -D rebase
+ " &&
+ git branch rebase F &&
+ ! git rebase --onto D F~1 F
+ git test --rebasing
+
+'
+
+test_expect_success 'git test --not-rebasing' \
+'
+ test_when_finished "
+ git reset --hard HEAD &&
+ git checkout -f master &&
+ git branch -D rebase
+ " &&
+ git branch rebase F &&
+ ! git rebase --onto D F~1 F
+ test_must_fail git test --not-rebasing
+'
+
test_done
--
1.7.5.rc1.23.g7f622