X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/9b4a6e70a1390d653201e48e12d09005b3fba6c8..2171eff37c64813683355542bd6e5947c7e53bcd:/t/t2600-coalesce.sh diff --git a/t/t2600-coalesce.sh b/t/t2600-coalesce.sh index f13a309..9a043fd 100755 --- a/t/t2600-coalesce.sh +++ b/t/t2600-coalesce.sh @@ -15,17 +15,30 @@ test_expect_success 'Initialize StGit stack' ' ' test_expect_success 'Coalesce some patches' ' - [ "$(echo $(stg applied))" = "p0 p1 p2 p3" ] && - [ "$(echo $(stg unapplied))" = "" ] && + [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2 p3" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "" ] && stg coalesce --name=q0 --message="wee woo" p1 p2 && - [ "$(echo $(stg applied))" = "p0 q0 p3" ] && - [ "$(echo $(stg unapplied))" = "" ] + [ "$(echo $(stg series --applied --noprefix))" = "p0 q0 p3" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "" ] ' test_expect_success 'Coalesce at stack top' ' stg coalesce --name=q1 --message="wee woo wham" q0 p3 && - [ "$(echo $(stg applied))" = "p0 q1" ] && - [ "$(echo $(stg unapplied))" = "" ] + [ "$(echo $(stg series --applied --noprefix))" = "p0 q1" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "" ] +' + +cat > editor <> foo.txt && + git commit -a -m "a new commit" && + EDITOR=./editor command_error stg coalesce --name=r0 p0 q1 && + test "$(echo $(stg series))" = "+ p0 > q1" && + test ! -e editor-invoked ' test_done