@matheusbsbs / matheus-bagliano / commits / 75c5aa0701
Fork 0

t3206: s/expected/expect/

For test cases, the usual convention is to name expected output files "expect", not "expected". Replace all instances of "expected" with "expect". Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Nov 20, 2019 at 13:18 UTC 75c5aa070119f4a52bcfedf7c1666b234ed3edc5
1 file changed +32 -32
t/t3206-range-diff.sh
+32 -32
@@ -121,88 +121,88 @@ test_expect_success 'setup' '
121 test_expect_success 'simple A..B A..C (unmodified)' '
122 git range-diff --no-color master..topic master..unmodified \
123 >actual &&
124 - cat >expected <<-EOF &&
124 + cat >expect <<-EOF &&
125 1: $(test_oid t1) = 1: $(test_oid u1) s/5/A/
126 2: $(test_oid t2) = 2: $(test_oid u2) s/4/A/
127 3: $(test_oid t3) = 3: $(test_oid u3) s/11/B/
128 4: $(test_oid t4) = 4: $(test_oid u4) s/12/B/
129 EOF
130 - test_cmp expected actual
130 + test_cmp expect actual
131 '
132
133 test_expect_success 'simple B...C (unmodified)' '
134 git range-diff --no-color topic...unmodified >actual &&
135 - # same "expected" as above
136 - test_cmp expected actual
135 + # same "expect" as above
136 + test_cmp expect actual
137 '
138
139 test_expect_success 'simple A B C (unmodified)' '
140 git range-diff --no-color master topic unmodified >actual &&
141 - # same "expected" as above
142 - test_cmp expected actual
141 + # same "expect" as above
142 + test_cmp expect actual
143 '
144
145 test_expect_success 'trivial reordering' '
146 git range-diff --no-color master topic reordered >actual &&
147 - cat >expected <<-EOF &&
147 + cat >expect <<-EOF &&
148 1: $(test_oid t1) = 1: $(test_oid r1) s/5/A/
149 3: $(test_oid t3) = 2: $(test_oid r2) s/11/B/
150 4: $(test_oid t4) = 3: $(test_oid r3) s/12/B/
151 2: $(test_oid t2) = 4: $(test_oid r4) s/4/A/
152 EOF
153 - test_cmp expected actual
153 + test_cmp expect actual
154 '
155
156 test_expect_success 'removed a commit' '
157 git range-diff --no-color master topic removed >actual &&
158 - cat >expected <<-EOF &&
158 + cat >expect <<-EOF &&
159 1: $(test_oid t1) = 1: $(test_oid d1) s/5/A/
160 2: $(test_oid t2) < -: $(test_oid __) s/4/A/
161 3: $(test_oid t3) = 2: $(test_oid d2) s/11/B/
162 4: $(test_oid t4) = 3: $(test_oid d3) s/12/B/
163 EOF
164 - test_cmp expected actual
164 + test_cmp expect actual
165 '
166
167 test_expect_success 'added a commit' '
168 git range-diff --no-color master topic added >actual &&
169 - cat >expected <<-EOF &&
169 + cat >expect <<-EOF &&
170 1: $(test_oid t1) = 1: $(test_oid a1) s/5/A/
171 2: $(test_oid t2) = 2: $(test_oid a2) s/4/A/
172 -: $(test_oid __) > 3: $(test_oid a3) s/6/A/
173 3: $(test_oid t3) = 4: $(test_oid a4) s/11/B/
174 4: $(test_oid t4) = 5: $(test_oid a5) s/12/B/
175 EOF
176 - test_cmp expected actual
176 + test_cmp expect actual
177 '
178
179 test_expect_success 'new base, A B C' '
180 git range-diff --no-color master topic rebased >actual &&
181 - cat >expected <<-EOF &&
181 + cat >expect <<-EOF &&
182 1: $(test_oid t1) = 1: $(test_oid b1) s/5/A/
183 2: $(test_oid t2) = 2: $(test_oid b2) s/4/A/
184 3: $(test_oid t3) = 3: $(test_oid b3) s/11/B/
185 4: $(test_oid t4) = 4: $(test_oid b4) s/12/B/
186 EOF
187 - test_cmp expected actual
187 + test_cmp expect actual
188 '
189
190 test_expect_success 'new base, B...C' '
191 # this syntax includes the commits from master!
192 git range-diff --no-color topic...rebased >actual &&
193 - cat >expected <<-EOF &&
193 + cat >expect <<-EOF &&
194 -: $(test_oid __) > 1: $(test_oid b5) unrelated
195 1: $(test_oid t1) = 2: $(test_oid b1) s/5/A/
196 2: $(test_oid t2) = 3: $(test_oid b2) s/4/A/
197 3: $(test_oid t3) = 4: $(test_oid b3) s/11/B/
198 4: $(test_oid t4) = 5: $(test_oid b4) s/12/B/
199 EOF
200 - test_cmp expected actual
200 + test_cmp expect actual
201 '
202
203 test_expect_success 'changed commit' '
204 git range-diff --no-color topic...changed >actual &&
205 - cat >expected <<-EOF &&
205 + cat >expect <<-EOF &&
206 1: $(test_oid t1) = 1: $(test_oid c1) s/5/A/
207 2: $(test_oid t2) = 2: $(test_oid c2) s/4/A/
208 3: $(test_oid t3) ! 3: $(test_oid c3) s/11/B/
@@ -226,23 +226,23 @@ test_expect_success 'changed commit' '
226 +B
227 13
228 EOF
229 - test_cmp expected actual
229 + test_cmp expect actual
230 '
231
232 test_expect_success 'changed commit with --no-patch diff option' '
233 git range-diff --no-color --no-patch topic...changed >actual &&
234 - cat >expected <<-EOF &&
234 + cat >expect <<-EOF &&
235 1: $(test_oid t1) = 1: $(test_oid c1) s/5/A/
236 2: $(test_oid t2) = 2: $(test_oid c2) s/4/A/
237 3: $(test_oid t3) ! 3: $(test_oid c3) s/11/B/
238 4: $(test_oid t4) ! 4: $(test_oid c4) s/12/B/
239 EOF
240 - test_cmp expected actual
240 + test_cmp expect actual
241 '
242
243 test_expect_success 'changed commit with --stat diff option' '
244 git range-diff --no-color --stat topic...changed >actual &&
245 - cat >expected <<-EOF &&
245 + cat >expect <<-EOF &&
246 1: $(test_oid t1) = 1: $(test_oid c1) s/5/A/
247 a => b | 0
248 1 file changed, 0 insertions(+), 0 deletions(-)
@@ -256,12 +256,12 @@ test_expect_success 'changed commit with --stat diff option' '
256 a => b | 0
257 1 file changed, 0 insertions(+), 0 deletions(-)
258 EOF
259 - test_cmp expected actual
259 + test_cmp expect actual
260 '
261
262 test_expect_success 'changed commit with sm config' '
263 git range-diff --no-color --submodule=log topic...changed >actual &&
264 - cat >expected <<-EOF &&
264 + cat >expect <<-EOF &&
265 1: $(test_oid t1) = 1: $(test_oid c1) s/5/A/
266 2: $(test_oid t2) = 2: $(test_oid c2) s/4/A/
267 3: $(test_oid t3) ! 3: $(test_oid c3) s/11/B/
@@ -285,12 +285,12 @@ test_expect_success 'changed commit with sm config' '
285 +B
286 13
287 EOF
288 - test_cmp expected actual
288 + test_cmp expect actual
289 '
290
291 test_expect_success 'renamed file' '
292 git range-diff --no-color --submodule=log topic...renamed-file >actual &&
293 - sed s/Z/\ /g >expected <<-EOF &&
293 + sed s/Z/\ /g >expect <<-EOF &&
294 1: $(test_oid t1) = 1: $(test_oid n1) s/5/A/
295 2: $(test_oid t2) ! 2: $(test_oid n2) s/4/A/
296 @@ Metadata
@@ -330,12 +330,12 @@ test_expect_success 'renamed file' '
330 Z 10
331 Z B
332 EOF
333 - test_cmp expected actual
333 + test_cmp expect actual
334 '
335
336 test_expect_success 'file with mode only change' '
337 git range-diff --no-color --submodule=log topic...mode-only-change >actual &&
338 - sed s/Z/\ /g >expected <<-EOF &&
338 + sed s/Z/\ /g >expect <<-EOF &&
339 1: fccce22 ! 1: 4d39cb3 s/4/A/
340 @@ Metadata
341 ZAuthor: Thomas Rast <trast@inf.ethz.ch>
@@ -370,12 +370,12 @@ test_expect_success 'file with mode only change' '
370 + ## other-file (mode change 100644 => 100755) ##
371 3: a63e992 = 3: 4c1e0f5 s/12/B/
372 EOF
373 - test_cmp expected actual
373 + test_cmp expect actual
374 '
375
376 test_expect_success 'file added and later removed' '
377 git range-diff --no-color --submodule=log topic...added-removed >actual &&
378 - sed s/Z/\ /g >expected <<-EOF &&
378 + sed s/Z/\ /g >expect <<-EOF &&
379 1: $(test_oid t1) = 1: $(test_oid s1) s/5/A/
380 2: $(test_oid t2) ! 2: $(test_oid s2) s/4/A/
381 @@ Metadata
@@ -411,7 +411,7 @@ test_expect_success 'file added and later removed' '
411 + ## new-file (deleted) ##
412 4: $(test_oid t4) = 4: $(test_oid s4) s/12/B/
413 EOF
414 - test_cmp expected actual
414 + test_cmp expect actual
415 '
416
417 test_expect_success 'no commits on one side' '
@@ -421,7 +421,7 @@ test_expect_success 'no commits on one side' '
421
422 test_expect_success 'changed message' '
423 git range-diff --no-color topic...changed-message >actual &&
424 - sed s/Z/\ /g >expected <<-EOF &&
424 + sed s/Z/\ /g >expect <<-EOF &&
425 1: $(test_oid t1) = 1: $(test_oid m1) s/5/A/
426 2: $(test_oid t2) ! 2: $(test_oid m2) s/4/A/
427 @@ Metadata
@@ -436,7 +436,7 @@ test_expect_success 'changed message' '
436 3: $(test_oid t3) = 3: $(test_oid m3) s/11/B/
437 4: $(test_oid t4) = 4: $(test_oid m4) s/12/B/
438 EOF
439 - test_cmp expected actual
439 + test_cmp expect actual
440 '
441
442 test_expect_success 'dual-coloring' '