You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
875 B
58 lines
875 B
#!/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
|
|
|