diff options
Diffstat (limited to 't/t3700-add.sh')
-rwxr-xr-x | t/t3700-add.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/t/t3700-add.sh b/t/t3700-add.sh index ec7108358e..575d9508a0 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -268,8 +268,12 @@ test_expect_success 'git add --dry-run of existing changed file' " test_expect_success 'git add --dry-run of non-existing file' " echo ignored-file >>.gitignore && - test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 && - echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual + test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 +" + +test_expect_success 'git add --dry-run of an existing file output' " + echo \"fatal: pathspec 'ignored-file' did not match any files\" >expect && + test_i18ncmp expect actual " cat >expect.err <<\EOF @@ -283,9 +287,12 @@ add 'track-this' EOF test_expect_success 'git add --dry-run --ignore-missing of non-existing file' ' - test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err && - test_cmp expect.out actual.out && - test_cmp expect.err actual.err + test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err +' + +test_expect_success 'git add --dry-run --ignore-missing of non-existing file output' ' + test_i18ncmp expect.out actual.out && + test_i18ncmp expect.err actual.err ' test_done |