X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/ec6084cb10a473ab381ded787f82cb9a4242b412..023b3a8d45741d1569519b9be8eb65ea716c857c:/t/t2500-clean.sh?ds=sidebyside diff --git a/t/t2500-clean.sh b/t/t2500-clean.sh index 3364c18..ad8f892 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 && + ! stg push +' + +test_expect_success 'Make sure conflicting patches are preserved' ' + stg clean && + [ "$(echo $(stg applied))" = "p0 p2 p1" ] && + [ "$(echo $(stg unapplied))" = "" ] +' + test_done