Signed-off-by: Lars Hjemli <hjemli@xxxxxxxxx> --- A bit late, but here's a testscript for the new options (shamelessly based on t3201). t/t3202-branch-merged.sh | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) create mode 100755 t/t3202-branch-merged.sh diff --git a/t/t3202-branch-merged.sh b/t/t3202-branch-merged.sh new file mode 100755 index 0000000..2710923 --- /dev/null +++ b/t/t3202-branch-merged.sh @@ -0,0 +1,68 @@ +#!/bin/sh + +test_description='branch --merged/--no-merged' + +. ./test-lib.sh + +test_expect_success setup ' + + >file && + git add file && + test_tick && + git commit -m initial && + git branch side && + + echo 1 >file && + test_tick && + git commit -a -m "second on master" && + + git checkout side && + echo 1 >file && + test_tick && + git commit -a -m "second on side" && + + git merge master + +' + +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 -- 1.5.5.74.g74a72 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html