summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3741ae7)
raw | patch | inline | side by side (parent: 3741ae7)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sun, 19 Sep 2010 15:59:10 +0000 (15:59 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:10:08 +0000 (07:10 +0000) |
Gettextize the "Use -f if you really want to add them.\n"
message. Tests in t2204-add-ignored.sh and t3700-add.sh explicitly
checked for this message. Split the tests that did so up and skip
portion that calls grep on this message under
GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
message. Tests in t2204-add-ignored.sh and t3700-add.sh explicitly
checked for this message. Split the tests that did so up and skip
portion that calls grep on this message under
GETTEXT_POISON=YesPlease.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
builtin/add.c | patch | blob | history | |
t/t2204-add-ignored.sh | patch | blob | history |
diff --git a/builtin/add.c b/builtin/add.c
index 7358280c596ab63361c3851ecd043a1466a94ee5..a88f50f337e69b8977e477681b32558121ac533f 100644 (file)
--- a/builtin/add.c
+++ b/builtin/add.c
fprintf(stderr, ignore_error);
for (i = 0; i < dir->ignored_nr; i++)
fprintf(stderr, "%s\n", dir->ignored[i]->name);
- fprintf(stderr, "Use -f if you really want to add them.\n");
+ fprintf(stderr, _("Use -f if you really want to add them.\n"));
die(_("no files added"));
}
diff --git a/t/t2204-add-ignored.sh b/t/t2204-add-ignored.sh
index 24afdabab7e30feaf583079a75a756d267181bb9..be66e2db0a0b85f49dab43d35d528f1a3986f3c3 100755 (executable)
--- a/t/t2204-add-ignored.sh
+++ b/t/t2204-add-ignored.sh
rm -f .git/index &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ '
+
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i output" '
+ grep -e "Use -f if" err
'
test_expect_success "complaints for ignored $i with unignored file" '
rm -f .git/index &&
test_must_fail git add "$i" file 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ '
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i with unignored file output" '
+ grep -e "Use -f if" err
'
done
cd dir &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ )
+ '
+
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i in dir output" '
+ (
+ cd dir &&
+ grep -e "Use -f if" err
)
'
done
cd sub &&
test_must_fail git add "$i" 2>err &&
git ls-files "$i" >out &&
- ! test -s out &&
- grep -e "Use -f if" err &&
- cat err
+ ! test -s out
+ )
+ '
+
+ test_expect_success NO_GETTEXT_POISON "complaints for ignored $i in sub output" '
+ (
+ cd sub &&
+ grep -e "Use -f if" err
)
'
done