chiark / gitweb /
Catch early trying rebasing to unknown ref, and add testcase.
[stgit] / t / t2200-rebase.sh
index 52462dd94926e9340d9cd19855644a1cd984b9f4..c142e08d1934f68b23bb6671a68015012ded4c09 100755 (executable)
@@ -27,7 +27,20 @@ test_expect_success \
        'Rebase to previous commit' \
        '
        stg rebase master~1 &&
-       test `stg id base@stack` = `git rev-parse master~1`
+       test `stg id base@stack` = `git rev-parse master~1` &&
+       test `stg applied | wc -l` = 1
+       '
+
+test_expect_failure \
+       'Attempt rebase to non-existing commit' \
+       '
+       stg rebase not-a-ref
+       '
+
+test_expect_success \
+       'Check patches were re-applied' \
+       '
+       test $(stg applied | wc -l) = 1
        '
 
 test_done