From: Lars Hjemli Date: Fri, 18 Apr 2008 16:30:15 +0000 (+0200) Subject: Add tests for `branch --[no-]merged` X-Git-Tag: v1.5.6-rc0~95^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f9fd5210c825dfcd245a2cd38e7b12c03000c33f;p=git.git Add tests for `branch --[no-]merged` Signed-off-by: Lars Hjemli Signed-off-by: Junio C Hamano --- diff --git a/t/t3201-branch-contains.sh b/t/t3201-branch-contains.sh index b4cf628d2..f86f4bc5e 100755 --- a/t/t3201-branch-contains.sh +++ b/t/t3201-branch-contains.sh @@ -1,6 +1,6 @@ #!/bin/sh -test_description='branch --contains ' +test_description='branch --contains , --merged, and --no-merged' . ./test-lib.sh @@ -55,4 +55,44 @@ test_expect_success 'branch --contains=side' ' ' +test_expect_success 'side: branch --merged' ' + + git branch --merged >actual && + { + echo " master" && + echo "* side" + } >expect && + test_cmp expect actual + +' + +test_expect_success 'side: branch --no-merged' ' + + git branch --no-merged >actual && + >expect && + test_cmp expect actual + +' + +test_expect_success 'master: branch --merged' ' + + git checkout master && + git branch --merged >actual && + { + echo "* master" + } >expect && + test_cmp expect actual + +' + +test_expect_success 'master: branch --no-merged' ' + + git branch --no-merged >actual && + { + echo " side" + } >expect && + test_cmp expect actual + +' + test_done