X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/ec6084cb10a473ab381ded787f82cb9a4242b412..a2f4fe7de51cb580ca587d155f01ad569edd36ae:/t/t2500-clean.sh diff --git a/t/t2500-clean.sh b/t/t2500-clean.sh index 3364c18..abde9cf 100755 --- a/t/t2500-clean.sh +++ b/t/t2500-clean.sh @@ -24,4 +24,21 @@ test_expect_success 'Clean empty patches' ' [ "$(echo $(stg unapplied))" = "" ] ' +test_expect_success 'Create a conflict' ' + stg new p1 -m p1 && + echo bar > foo.txt && + stg refresh && + stg pop && + stg new p2 -m p2 + echo quux > foo.txt && + stg refresh && + conflict_old stg push +' + +test_expect_success 'Make sure conflicting patches are preserved' ' + stg clean && + [ "$(echo $(stg applied))" = "p0 p2 p1" ] && + [ "$(echo $(stg unapplied))" = "" ] +' + test_done