Skip to content

Commit f2c8c80

Browse files
committed
i18n: use test_i18ngrep in t2020, t2204, t3030, and t3200
Signed-off-by: Junio C Hamano <[email protected]>
1 parent d3bd042 commit f2c8c80

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

t/t2020-checkout-detach.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ check_not_detached () {
1313

1414
ORPHAN_WARNING='you are leaving .* commit.*behind'
1515
check_orphan_warning() {
16-
grep "$ORPHAN_WARNING" "$1"
16+
test_i18ngrep "$ORPHAN_WARNING" "$1"
1717
}
1818
check_no_orphan_warning() {
19-
! grep "$ORPHAN_WARNING" "$1"
19+
test_i18ngrep ! "$ORPHAN_WARNING" "$1"
2020
}
2121

2222
reset () {
@@ -111,7 +111,7 @@ test_expect_success 'checkout warns on orphan commits' '
111111
git checkout master 2>stderr
112112
'
113113

114-
test_expect_success C_LOCALE_OUTPUT 'checkout warns on orphan commits: output' '
114+
test_expect_success 'checkout warns on orphan commits: output' '
115115
check_orphan_warning stderr
116116
'
117117

@@ -121,7 +121,7 @@ test_expect_success 'checkout does not warn leaving ref tip' '
121121
git checkout master 2>stderr
122122
'
123123

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' '
125125
check_no_orphan_warning stderr
126126
'
127127

@@ -131,7 +131,7 @@ test_expect_success 'checkout does not warn leaving reachable commit' '
131131
git checkout master 2>stderr
132132
'
133133

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' '
135135
check_no_orphan_warning stderr
136136
'
137137

t/t2204-add-ignored.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ do
3434
! test -s out
3535
'
3636

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
3939
'
4040

4141
test_expect_success "complaints for ignored $i with unignored file" '
@@ -44,8 +44,8 @@ do
4444
git ls-files "$i" >out &&
4545
! test -s out
4646
'
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
4949
'
5050
done
5151

@@ -61,10 +61,10 @@ do
6161
)
6262
'
6363

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" '
6565
(
6666
cd dir &&
67-
grep -e "Use -f if" err
67+
test_i18ngrep -e "Use -f if" err
6868
)
6969
'
7070
done
@@ -81,10 +81,10 @@ do
8181
)
8282
'
8383

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" '
8585
(
8686
cd sub &&
87-
grep -e "Use -f if" err
87+
test_i18ngrep -e "Use -f if" err
8888
)
8989
'
9090
done

t/t3030-merge-recursive.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,20 +312,20 @@ test_expect_success 'merge-recursive result' '
312312
313313
'
314314

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' '
316316
317317
rm -fr [abcd] &&
318318
git checkout -f "$c1" &&
319319
320320
test_must_fail git merge "$c5" &&
321321
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 &&
323323
git add -u &&
324324
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 &&
326326
rm -f .git/MERGE_HEAD &&
327327
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
329329
'
330330

331331
test_expect_success 'merge-recursive remove conflict' '

t/t3200-branch.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,12 @@ test_expect_success 'test deleting branch deletes branch config' \
203203
test -z "$(git config branch.my7.remote)" &&
204204
test -z "$(git config branch.my7.merge)"'
205205

206-
test_expect_success C_LOCALE_OUTPUT 'test deleting branch without config' \
206+
test_expect_success 'test deleting branch without config' \
207207
'git branch my7 s &&
208208
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'
210212

211213
test_expect_success 'test --track without .fetch entries' \
212214
'git branch --track my8 &&

0 commit comments

Comments
 (0)