3 test_description
='branch --contains <commit>, --merged, and --no-merged'
7 test_expect_success setup
'
12 git commit -m initial &&
17 git commit -a -m "second on master" &&
22 git commit -a -m "second on side" &&
28 test_expect_success
'branch --contains=master' '
30 git branch --contains=master >actual &&
32 echo " master" && echo "* side"
34 test_cmp expect actual
38 test_expect_success
'branch --contains master' '
40 git branch --contains master >actual &&
42 echo " master" && echo "* side"
44 test_cmp expect actual
48 test_expect_success
'branch --contains=side' '
50 git branch --contains=side >actual &&
54 test_cmp expect actual
58 test_expect_success
'side: branch --merged' '
60 git branch --merged >actual &&
65 test_cmp expect actual
69 test_expect_success
'side: branch --no-merged' '
71 git branch --no-merged >actual &&
73 test_cmp expect actual
77 test_expect_success
'master: branch --merged' '
79 git checkout master &&
80 git branch --merged >actual &&
84 test_cmp expect actual
88 test_expect_success
'master: branch --no-merged' '
90 git branch --no-merged >actual &&
94 test_cmp expect actual