X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft3700-add.sh;h=ec7108358e7b7f54f0b5e7530c8368e4a56576af;hb=2f3e3f573d635c26ce26ff61f8f6c97ce88da79c;hp=7d7140db380225bfffd3b64c125e2599b6be77c2;hpb=c208e05bd9880028c980fafbc5dda3d17a603ac1;p=git.git diff --git a/t/t3700-add.sh b/t/t3700-add.sh index 7d7140db3..575d9508a 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -179,7 +179,7 @@ test_expect_success 'git add --refresh' ' test -z "`git diff-index HEAD -- foo`" ' -test_expect_success POSIXPERM 'git add should fail atomically upon an unreadable file' ' +test_expect_success POSIXPERM,SANITY 'git add should fail atomically upon an unreadable file' ' git reset --hard && date >foo1 && date >foo2 && @@ -190,7 +190,7 @@ test_expect_success POSIXPERM 'git add should fail atomically upon an unreadable rm -f foo2 -test_expect_success POSIXPERM 'git add --ignore-errors' ' +test_expect_success POSIXPERM,SANITY 'git add --ignore-errors' ' git reset --hard && date >foo1 && date >foo2 && @@ -201,7 +201,7 @@ test_expect_success POSIXPERM 'git add --ignore-errors' ' rm -f foo2 -test_expect_success POSIXPERM 'git add (add.ignore-errors)' ' +test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors)' ' git config add.ignore-errors 1 && git reset --hard && date >foo1 && @@ -212,7 +212,7 @@ test_expect_success POSIXPERM 'git add (add.ignore-errors)' ' ' rm -f foo2 -test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' ' +test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors = false)' ' git config add.ignore-errors 0 && git reset --hard && date >foo1 && @@ -223,7 +223,7 @@ test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' ' ' rm -f foo2 -test_expect_success POSIXPERM '--no-ignore-errors overrides config' ' +test_expect_success POSIXPERM,SANITY '--no-ignore-errors overrides config' ' git config add.ignore-errors 1 && git reset --hard && date >foo1 && @@ -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