X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/9564af74822b276d435319fc271eda591e5125a6..refs/heads/origin:/t/t2500-clean.sh?ds=sidebyside diff --git a/t/t2500-clean.sh b/t/t2500-clean.sh index ad8f892..8082c21 100755 --- a/t/t2500-clean.sh +++ b/t/t2500-clean.sh @@ -9,7 +9,7 @@ test_expect_success 'Initialize StGit stack' ' stg new e0 -m e0 && stg new p0 -m p0 && echo foo > foo.txt && - git add foo.txt && + stg add foo.txt && stg refresh && stg new e1 -m e1 && stg new e2 -m e2 && @@ -17,11 +17,11 @@ test_expect_success 'Initialize StGit stack' ' ' test_expect_success 'Clean empty patches' ' - [ "$(echo $(stg applied))" = "e0 p0 e1" ] && - [ "$(echo $(stg unapplied))" = "e2" ] && + [ "$(echo $(stg series --applied --noprefix))" = "e0 p0 e1" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "e2" ] && stg clean && - [ "$(echo $(stg applied))" = "p0" ] && - [ "$(echo $(stg unapplied))" = "" ] + [ "$(echo $(stg series --applied --noprefix))" = "p0" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "" ] ' test_expect_success 'Create a conflict' ' @@ -32,13 +32,13 @@ test_expect_success 'Create a conflict' ' stg new p2 -m p2 echo quux > foo.txt && stg refresh && - ! stg push + conflict stg push ' test_expect_success 'Make sure conflicting patches are preserved' ' stg clean && - [ "$(echo $(stg applied))" = "p0 p2 p1" ] && - [ "$(echo $(stg unapplied))" = "" ] + [ "$(echo $(stg series --applied --noprefix))" = "p0 p2 p1" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "" ] ' test_done