X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/1eae3bf5ef8561508d83845f27b61c7533ba3378..cb1570e14f5e021ccd6580f207fdc6297611fc49:/t/t1600-delete-one.sh diff --git a/t/t1600-delete-one.sh b/t/t1600-delete-one.sh index 3052b3a..b526a55 100755 --- a/t/t1600-delete-one.sh +++ b/t/t1600-delete-one.sh @@ -20,7 +20,7 @@ test_expect_success \ 'Try to delete a non-existing patch' \ ' [ $(stg applied | wc -l) -eq 1 ] && - ! stg delete bar && + command_error stg delete bar && [ $(stg applied | wc -l) -eq 1 ] ' @@ -29,7 +29,7 @@ test_expect_success \ ' echo dirty >> foo.txt && [ $(stg applied | wc -l) -eq 1 ] && - ! stg delete foo && + command_error stg delete foo && [ $(stg applied | wc -l) -eq 1 ] && git reset --hard ' @@ -77,8 +77,8 @@ test_expect_success \ 'Try to delete a non-topmost applied patch' \ ' [ $(stg applied | wc -l) -eq 2 ] && - ! stg delete foo && - [ $(stg applied | wc -l) -eq 2 ] + stg delete foo && + [ $(stg applied | wc -l) -eq 1 ] ' test_expect_success \ @@ -99,10 +99,10 @@ test_expect_success \ test_expect_success \ 'Delete a patch in another branch' \ ' - [ $(stg applied | wc -l) -eq 3 ] && + [ $(stg applied | wc -l) -eq 2 ] && [ $(stg applied -b br | wc -l) -eq 1 ] && stg delete -b br baz && - [ $(stg applied | wc -l) -eq 3 ] && + [ $(stg applied | wc -l) -eq 2 ] && [ $(stg applied -b br | wc -l) -eq 0 ] '