X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/a1d6a0811bac0329f50ffa4742cf7894390104bf..d8a700cfaa9da3e0fbcba3c5670432ce760b2f06:/t/t1303-commit.sh diff --git a/t/t1303-commit.sh b/t/t1303-commit.sh index d53b9f2..2d85078 100755 --- a/t/t1303-commit.sh +++ b/t/t1303-commit.sh @@ -6,6 +6,27 @@ test_expect_success 'Initialize the StGIT repository' ' stg init ' +test_expect_success 'Commit middle patch' ' + stg new -m p1 && + stg new -m p2 && + stg new -m p3 && + stg new -m p4 && + stg pop && + stg commit p2 && + test "$(echo $(stg series))" = "+ p1 > p3 - p4" +' + +test_expect_success 'Commit first patch' ' + stg commit && + test "$(echo $(stg series))" = "> p3 - p4" +' + +test_expect_success 'Commit all patches' ' + stg push && + stg commit -a && + test "$(echo $(stg series))" = "" +' + # stg commit with top != head should not succeed, since the committed # patches are poptentially lost. test_expect_success 'Commit when top != head (should fail)' '