1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-30 05:47:53 +01:00
git/t/t3201-branch-contains.sh
Junio C Hamano 3f7dfe77b7 git-branch --contains: doc and test
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 22:11:28 -08:00

58 lines
875 B
Bash
Executable file

#!/bin/sh
test_description='branch --contains <commit>'
. ./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 'branch --contains=master' '
git branch --contains=master >actual &&
{
echo " master" && echo "* side"
} >expect &&
diff -u expect actual
'
test_expect_success 'branch --contains master' '
git branch --contains master >actual &&
{
echo " master" && echo "* side"
} >expect &&
diff -u expect actual
'
test_expect_success 'branch --contains=side' '
git branch --contains=side >actual &&
{
echo "* side"
} >expect &&
diff -u expect actual
'
test_done