mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
Add tests for branch --[no-]merged
Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
9a7ea2b1f3
commit
f9fd5210c8
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='branch --contains <commit>'
|
||||
test_description='branch --contains <commit>, --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
|
||||
|
Loading…
Reference in New Issue
Block a user