t5520: use better test to check stderr output
Checking stderr output using test_i18ncmp may lead to test failure as some shells write trace output to stderr when run under 'set -x'. Use test_i18ngrep instead of test_i18ncmp. Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain committed
Apr 2, 2016 at 23:28 UTC
6ddc97c7dc11076be30846c13666e5bc1844629a
1 file changed
+4
-6
t/t5520-pull.sh
+4
-6
@@ -317,15 +317,13 @@ test_expect_success 'pull --rebase --no-autostash & rebase.autostash unset' '
317
'
318
319
test_expect_success 'pull --autostash (without --rebase) should error out' '
320
- test_must_fail git pull --autostash . copy 2>actual &&
321
- echo "fatal: --[no-]autostash option is only valid with --rebase." >expect &&
322
- test_i18ncmp actual expect
320
+ test_must_fail git pull --autostash . copy 2>err &&
321
+ test_i18ngrep "only valid with --rebase" err
322
'
323
324
test_expect_success 'pull --no-autostash (without --rebase) should error out' '
326
- test_must_fail git pull --no-autostash . copy 2>actual &&
327
- echo "fatal: --[no-]autostash option is only valid with --rebase." >expect &&
328
- test_i18ncmp actual expect
325
+ test_must_fail git pull --no-autostash . copy 2>err &&
326
+ test_i18ngrep "only valid with --rebase" err
327
'
328
329
test_expect_success 'pull.rebase' '