Skip to content

Commit 771fa1d

Browse files
committed
Merge branch 'th/t8003-unhide-git-failures' into seen
Test clean-up. * th/t8003-unhide-git-failures: t8003: avoid suppressing git's exit code
2 parents c6c7e98 + 2f10287 commit 771fa1d

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

t/t8003-blame-corner-cases.sh

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,67 +50,78 @@ test_expect_success setup '
5050

5151
test_expect_success 'straight copy without -C' '
5252
53-
git blame uno | grep Second
53+
git blame uno >actual &&
54+
grep Second actual
5455
5556
'
5657

5758
test_expect_success 'straight move without -C' '
5859
59-
git blame dos | grep Initial
60+
git blame dos >actual &&
61+
grep Initial actual
6062
6163
'
6264

6365
test_expect_success 'straight copy with -C' '
6466
65-
git blame -C1 uno | grep Second
67+
git blame -C1 uno >actual &&
68+
grep Second actual
6669
6770
'
6871

6972
test_expect_success 'straight move with -C' '
7073
71-
git blame -C1 dos | grep Initial
74+
git blame -C1 dos >actual &&
75+
grep Initial actual
7276
7377
'
7478

7579
test_expect_success 'straight copy with -C -C' '
7680
77-
git blame -C -C1 uno | grep Initial
81+
git blame -C -C1 uno >actual &&
82+
grep Initial actual
7883
7984
'
8085

8186
test_expect_success 'straight move with -C -C' '
8287
83-
git blame -C -C1 dos | grep Initial
88+
git blame -C -C1 dos >actual &&
89+
grep Initial actual
8490
8591
'
8692

8793
test_expect_success 'append without -C' '
8894
89-
git blame -L2 tres | grep Second
95+
git blame -L2 tres >actual &&
96+
grep Second actual
9097
9198
'
9299

93100
test_expect_success 'append with -C' '
94101
95-
git blame -L2 -C1 tres | grep Second
102+
git blame -L2 -C1 tres >actual &&
103+
grep Second actual
96104
97105
'
98106

99107
test_expect_success 'append with -C -C' '
100108
101-
git blame -L2 -C -C1 tres | grep Second
109+
git blame -L2 -C -C1 tres >actual &&
110+
grep Second actual
102111
103112
'
104113

105114
test_expect_success 'append with -C -C -C' '
106115
107-
git blame -L2 -C -C -C1 tres | grep Initial
116+
git blame -L2 -C -C -C1 tres >actual &&
117+
grep Initial actual
108118
109119
'
110120

111121
test_expect_success 'blame wholesale copy' '
112122
113-
git blame -f -C -C1 HEAD^ -- cow | sed -e "$pick_fc" >current &&
123+
git blame -f -C -C1 HEAD^ -- cow >actual &&
124+
sed -e "$pick_fc" actual >current &&
114125
cat >expected <<-\EOF &&
115126
mouse-Initial
116127
mouse-Second
@@ -122,7 +133,8 @@ test_expect_success 'blame wholesale copy' '
122133

123134
test_expect_success 'blame wholesale copy and more' '
124135
125-
git blame -f -C -C1 HEAD -- cow | sed -e "$pick_fc" >current &&
136+
git blame -f -C -C1 HEAD -- cow >actual &&
137+
sed -e "$pick_fc" actual >current &&
126138
cat >expected <<-\EOF &&
127139
mouse-Initial
128140
mouse-Second
@@ -144,7 +156,8 @@ test_expect_success 'blame wholesale copy and more in the index' '
144156
EOF
145157
git add horse &&
146158
test_when_finished "git rm -f horse" &&
147-
git blame -f -C -C1 -- horse | sed -e "$pick_fc" >current &&
159+
git blame -f -C -C1 -- horse >actual &&
160+
sed -e "$pick_fc" actual >current &&
148161
cat >expected <<-\EOF &&
149162
mouse-Initial
150163
mouse-Second
@@ -168,7 +181,8 @@ test_expect_success 'blame during cherry-pick with file rename conflict' '
168181
(git cherry-pick HEAD@{1} || test $? -eq 1) &&
169182
git show HEAD@{1}:rodent > rodent &&
170183
git add rodent &&
171-
git blame -f -C -C1 rodent | sed -e "$pick_fc" >current &&
184+
git blame -f -C -C1 rodent >actual &&
185+
sed -e "$pick_fc" actual >current &&
172186
cat >expected <<-\EOF &&
173187
mouse-Initial
174188
mouse-Second

0 commit comments

Comments
 (0)