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 1
1
#! /bin/sh
2
2
3
- test_description=' branch --contains <commit>'
3
+ test_description=' branch --contains <commit>, --merged, and --no-merged '
4
4
5
5
. ./test-lib.sh
6
6
@@ -55,4 +55,44 @@ test_expect_success 'branch --contains=side' '
55
55
56
56
'
57
57
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
+
58
98
test_done
You can’t perform that action at this time.
0 commit comments