summaryrefslogtreecommitdiff
path: root/t/t2204-add-ignored.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2011-02-22 23:41:30 +0000
committerJunio C Hamano <gitster@pobox.com>2011-03-09 23:52:53 -0800
commit439fb8296d0a08c09653a45c0f44757c6b9c99b2 (patch)
tree374a8a4a24427e1b96141cc45632138725df91f2 /t/t2204-add-ignored.sh
parent990ac4be0ad68e78c042d4caa532c410991420f5 (diff)
downloadgit-439fb8296d0a08c09653a45c0f44757c6b9c99b2.tar.gz
i18n: git-add "The following paths are ignored" message
The tests t2204 (.gitignore) and t3700 (add) explicitly check for these messages, so while at it, split each relevant test into a part that just checks "git add"'s exit status and a part that checks porcelain output. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2204-add-ignored.sh')
-rwxr-xr-xt/t2204-add-ignored.sh37
1 files changed, 25 insertions, 12 deletions
diff --git a/t/t2204-add-ignored.sh b/t/t2204-add-ignored.sh
index 24afdabab7..49753362f0 100755
--- a/t/t2204-add-ignored.sh
+++ b/t/t2204-add-ignored.sh
@@ -31,18 +31,21 @@ do
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 C_LOCALE_OUTPUT "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 C_LOCALE_OUTPUT "complaints for ignored $i with unignored file output" '
+ grep -e "Use -f if" err
'
done
@@ -54,9 +57,14 @@ do
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 C_LOCALE_OUTPUT "complaints for ignored $i in dir output" '
+ (
+ cd dir &&
+ grep -e "Use -f if" err
)
'
done
@@ -69,9 +77,14 @@ do
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 C_LOCALE_OUTPUT "complaints for ignored $i in sub output" '
+ (
+ cd sub &&
+ grep -e "Use -f if" err
)
'
done