Show a joined string rather than list when reporting GIT failures
[stgit] / t / t2200-rebase.sh
index 882572c..d9b6faf 100755 (executable)
@@ -31,4 +31,32 @@ test_expect_success \
        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_expect_success \
+       'Rebase to next commit' \
+       '
+       stg rebase master &&
+       test $(stg id base@stack) = $(git rev-parse master)
+       '
+
+test_expect_success \
+       'Commit the patch and rebase again' \
+       '
+       stg commit &&
+       git tag committed-here &&
+       stg rebase master &&
+       test $(stg id base@stack) = $(git rev-parse master)
+       '
+
 test_done