File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed
Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- test_description=' branch --contains <commit>'
3+ test_description=' branch --contains <commit>, --merged, and --no-merged '
44
55. ./test-lib.sh
66
@@ -55,4 +55,44 @@ test_expect_success 'branch --contains=side' '
5555
5656'
5757
58+ test_expect_success ' side: branch --merged' '
59+
60+ git branch --merged >actual &&
61+ {
62+ echo " master" &&
63+ echo "* side"
64+ } >expect &&
65+ test_cmp expect actual
66+
67+ '
68+
69+ test_expect_success ' side: branch --no-merged' '
70+
71+ git branch --no-merged >actual &&
72+ >expect &&
73+ test_cmp expect actual
74+
75+ '
76+
77+ test_expect_success ' master: branch --merged' '
78+
79+ git checkout master &&
80+ git branch --merged >actual &&
81+ {
82+ echo "* master"
83+ } >expect &&
84+ test_cmp expect actual
85+
86+ '
87+
88+ test_expect_success ' master: branch --no-merged' '
89+
90+ git branch --no-merged >actual &&
91+ {
92+ echo " side"
93+ } >expect &&
94+ test_cmp expect actual
95+
96+ '
97+
5898test_done
You can’t perform that action at this time.
0 commit comments