t3030 (merge-recursive): use test_expect_code

Use test_expect_code in preference to repeatedly checking exit codes by hand. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramkumar Ramachandra committed Dec 8, 2011 at 18:40 UTC 67b6afe1ed424934679649752c9efb9896bfacf0
1 file changed +6 -66
t/t3030-merge-recursive.sh
+6 -66
@@ -285,17 +285,7 @@ test_expect_success 'merge-recursive simple' '
285 rm -fr [abcd] &&
286 git checkout -f "$c2" &&
287
288 - git merge-recursive "$c0" -- "$c2" "$c1"
289 - status=$?
290 - case "$status" in
291 - 1)
292 - : happy
293 - ;;
294 - *)
295 - echo >&2 "why status $status!!!"
296 - false
297 - ;;
298 - esac
288 + test_expect_code 1 git merge-recursive "$c0" -- "$c2" "$c1"
289 '
290
291 test_expect_success 'merge-recursive result' '
@@ -334,17 +324,7 @@ test_expect_success 'merge-recursive remove conflict' '
324 rm -fr [abcd] &&
325 git checkout -f "$c1" &&
326
337 - git merge-recursive "$c0" -- "$c1" "$c5"
338 - status=$?
339 - case "$status" in
340 - 1)
341 - : happy
342 - ;;
343 - *)
344 - echo >&2 "why status $status!!!"
345 - false
346 - ;;
347 - esac
327 + test_expect_code 1 git merge-recursive "$c0" -- "$c1" "$c5"
328 '
329
330 test_expect_success 'merge-recursive remove conflict' '
@@ -388,17 +368,7 @@ test_expect_success 'merge-recursive d/f conflict' '
368 git reset --hard &&
369 git checkout -f "$c1" &&
370
391 - git merge-recursive "$c0" -- "$c1" "$c4"
392 - status=$?
393 - case "$status" in
394 - 1)
395 - : happy
396 - ;;
397 - *)
398 - echo >&2 "why status $status!!!"
399 - false
400 - ;;
401 - esac
371 + test_expect_code 1 git merge-recursive "$c0" -- "$c1" "$c4"
372 '
373
374 test_expect_success 'merge-recursive d/f conflict result' '
@@ -422,17 +392,7 @@ test_expect_success 'merge-recursive d/f conflict the other way' '
392 git reset --hard &&
393 git checkout -f "$c4" &&
394
425 - git merge-recursive "$c0" -- "$c4" "$c1"
426 - status=$?
427 - case "$status" in
428 - 1)
429 - : happy
430 - ;;
431 - *)
432 - echo >&2 "why status $status!!!"
433 - false
434 - ;;
435 - esac
395 + test_expect_code 1 git merge-recursive "$c0" -- "$c4" "$c1"
396 '
397
398 test_expect_success 'merge-recursive d/f conflict result the other way' '
@@ -456,17 +416,7 @@ test_expect_success 'merge-recursive d/f conflict' '
416 git reset --hard &&
417 git checkout -f "$c1" &&
418
459 - git merge-recursive "$c0" -- "$c1" "$c6"
460 - status=$?
461 - case "$status" in
462 - 1)
463 - : happy
464 - ;;
465 - *)
466 - echo >&2 "why status $status!!!"
467 - false
468 - ;;
469 - esac
419 + test_expect_code 1 git merge-recursive "$c0" -- "$c1" "$c6"
420 '
421
422 test_expect_success 'merge-recursive d/f conflict result' '
@@ -490,17 +440,7 @@ test_expect_success 'merge-recursive d/f conflict' '
440 git reset --hard &&
441 git checkout -f "$c6" &&
442
493 - git merge-recursive "$c0" -- "$c6" "$c1"
494 - status=$?
495 - case "$status" in
496 - 1)
497 - : happy
498 - ;;
499 - *)
500 - echo >&2 "why status $status!!!"
501 - false
502 - ;;
503 - esac
443 + test_expect_code 1 git merge-recursive "$c0" -- "$c6" "$c1"
444 '
445
446 test_expect_success 'merge-recursive d/f conflict result' '