i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Apr 12, 2011 at 16:20 UTC
f2c8c8007c43b75e6a461137364a3ec65108afbc
4 files changed
+21
-19
t/t2020-checkout-detach.sh
+5
-5
@@ -13,10 +13,10 @@ check_not_detached () {
13
14
ORPHAN_WARNING='you are leaving .* commit.*behind'
15
check_orphan_warning() {
16
- grep "$ORPHAN_WARNING" "$1"
16
+ test_i18ngrep "$ORPHAN_WARNING" "$1"
17
}
18
check_no_orphan_warning() {
19
- ! grep "$ORPHAN_WARNING" "$1"
19
+ test_i18ngrep ! "$ORPHAN_WARNING" "$1"
20
}
21
22
reset () {
@@ -111,7 +111,7 @@ test_expect_success 'checkout warns on orphan commits' '
111
git checkout master 2>stderr
112
'
113
114
-test_expect_success C_LOCALE_OUTPUT 'checkout warns on orphan commits: output' '
114
+test_expect_success 'checkout warns on orphan commits: output' '
115
check_orphan_warning stderr
116
'
117
@@ -121,7 +121,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '
121
git checkout master 2>stderr
122
'
123
124
-test_expect_success C_LOCALE_OUTPUT 'checkout does not warn leaving ref tip' '
124
+test_expect_success 'checkout does not warn leaving ref tip' '
125
check_no_orphan_warning stderr
126
'
127
@@ -131,7 +131,7 @@ test_expect_success 'checkout does not warn leaving reachable commit' '
131
git checkout master 2>stderr
132
'
133
134
-test_expect_success C_LOCALE_OUTPUT 'checkout does not warn leaving reachable commit' '
134
+test_expect_success 'checkout does not warn leaving reachable commit' '
135
check_no_orphan_warning stderr
136
'
137
t/t2204-add-ignored.sh
+8
-8
@@ -34,8 +34,8 @@ do
34
! test -s out
35
'
36
37
- test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i output" '
38
- grep -e "Use -f if" err
37
+ test_expect_success "complaints for ignored $i output" '
38
+ test_i18ngrep -e "Use -f if" err
39
'
40
41
test_expect_success "complaints for ignored $i with unignored file" '
@@ -44,8 +44,8 @@ do
44
git ls-files "$i" >out &&
45
! test -s out
46
'
47
- test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i with unignored file output" '
48
- grep -e "Use -f if" err
47
+ test_expect_success "complaints for ignored $i with unignored file output" '
48
+ test_i18ngrep -e "Use -f if" err
49
'
50
done
51
@@ -61,10 +61,10 @@ do
61
)
62
'
63
64
- test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i in dir output" '
64
+ test_expect_success "complaints for ignored $i in dir output" '
65
(
66
cd dir &&
67
- grep -e "Use -f if" err
67
+ test_i18ngrep -e "Use -f if" err
68
)
69
'
70
done
@@ -81,10 +81,10 @@ do
81
)
82
'
83
84
- test_expect_success C_LOCALE_OUTPUT "complaints for ignored $i in sub output" '
84
+ test_expect_success "complaints for ignored $i in sub output" '
85
(
86
cd sub &&
87
- grep -e "Use -f if" err
87
+ test_i18ngrep -e "Use -f if" err
88
)
89
'
90
done
t/t3030-merge-recursive.sh
+4
-4
@@ -312,20 +312,20 @@ test_expect_success 'merge-recursive result' '
312
313
'
314
315
-test_expect_success C_LOCALE_OUTPUT 'fail if the index has unresolved entries' '
315
+test_expect_success 'fail if the index has unresolved entries' '
316
317
rm -fr [abcd] &&
318
git checkout -f "$c1" &&
319
320
test_must_fail git merge "$c5" &&
321
test_must_fail git merge "$c5" 2> out &&
322
- grep "not possible because you have unmerged files" out &&
322
+ test_i18ngrep "not possible because you have unmerged files" out &&
323
git add -u &&
324
test_must_fail git merge "$c5" 2> out &&
325
- grep "You have not concluded your merge" out &&
325
+ test_i18ngrep "You have not concluded your merge" out &&
326
rm -f .git/MERGE_HEAD &&
327
test_must_fail git merge "$c5" 2> out &&
328
- grep "Your local changes to the following files would be overwritten by merge:" out
328
+ test_i18ngrep "Your local changes to the following files would be overwritten by merge:" out
329
'
330
331
test_expect_success 'merge-recursive remove conflict' '
t/t3200-branch.sh
+4
-2
@@ -203,10 +203,12 @@ test_expect_success 'test deleting branch deletes branch config' \
203
test -z "$(git config branch.my7.remote)" &&
204
test -z "$(git config branch.my7.merge)"'
205
206
-test_expect_success C_LOCALE_OUTPUT 'test deleting branch without config' \
206
+test_expect_success 'test deleting branch without config' \
207
'git branch my7 s &&
208
sha1=$(git rev-parse my7 | cut -c 1-7) &&
209
- test "$(git branch -d my7 2>&1)" = "Deleted branch my7 (was $sha1)."'
209
+ echo "Deleted branch my7 (was $sha1)." >expect &&
210
+ git branch -d my7 >actual 2>&1 &&
211
+ test_i18ncmp expect actual'
212
213
test_expect_success 'test --track without .fetch entries' \
214
'git branch --track my8 &&