Skip to content

Commit

Permalink
Add tests for branch --[no-]merged
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Lars Hjemli authored and Junio C Hamano committed Apr 21, 2008
1 parent 9a7ea2b commit f9fd521
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion t/t3201-branch-contains.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

test_description='branch --contains <commit>'
test_description='branch --contains <commit>, --merged, and --no-merged'

. ./test-lib.sh

Expand Down Expand Up @@ -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

0 comments on commit f9fd521

Please sign in to comment.