X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/89d889f42f6b0081c5e9e80b8b470d6770ff1e82..c7506039d0299c093140857b7a617ec6bcdbfc13:/t/t1205-push-subdir.sh diff --git a/t/t1205-push-subdir.sh b/t/t1205-push-subdir.sh index f9a84f6..4af63ce 100755 --- a/t/t1205-push-subdir.sh +++ b/t/t1205-push-subdir.sh @@ -12,8 +12,8 @@ test_expect_success 'Create some patches' ' stg add x.txt foo/y.txt && stg refresh done && - [ "$(echo $(stg applied))" = "p0 p1 p2" ] && - [ "$(echo $(stg unapplied))" = "" ] + [ "$(echo $(stg series --applied --noprefix))" = "p0 p1 p2" ] && + [ "$(echo $(stg series --unapplied --noprefix))" = "" ] ' test_expect_success 'Fast-forward push from a subdir' ' @@ -47,9 +47,23 @@ test_expect_success 'Conflicting push from subdir' ' [ "$(echo $(cat x.txt))" = "x0" ] && [ "$(echo $(cat foo/y.txt))" = "y0" ] && cd foo && - ! stg push p2 && + conflict stg push p2 && cd .. && [ "$(echo $(stg status --conflict))" = "foo/y.txt x.txt" ] ' +test_expect_success 'Conflicting add/unknown file in subdir' ' + stg status --reset && + stg new foo -m foo && + mkdir d && + echo foo > d/test && + stg add d/test && + stg refresh && + stg pop && + mkdir -p d && + echo bar > d/test && + command_error stg push foo && + [ $(stg top) != "foo" ] +' + test_done