Skip to content

Commit 608cc4f

Browse files
committed
Merge branch 'ab/detox-gettext-tests'
Removal of GIT_TEST_GETTEXT_POISON continues. * ab/detox-gettext-tests: tests: remove most uses of test_i18ncmp tests: remove last uses of C_LOCALE_OUTPUT tests: remove most uses of C_LOCALE_OUTPUT tests: remove last uses of GIT_TEST_GETTEXT_POISON=false
2 parents 6fe12b5 + 1108cea commit 608cc4f

File tree

104 files changed

+464
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+464
-478
lines changed

t/lib-credential.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ check() {
2020
false
2121
fi &&
2222
test_cmp expect-stdout stdout &&
23-
test_i18ncmp expect-stderr stderr
23+
test_cmp expect-stderr stderr
2424
}
2525

2626
read_chunk() {

t/lib-log-graph.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ sanitize_log_output () {
1212
lib_test_cmp_graph () {
1313
git log --graph "$@" >output &&
1414
sed 's/ *$//' >output.sanitized <output &&
15-
test_i18ncmp expect output.sanitized
15+
test_cmp expect output.sanitized
1616
}
1717

1818
lib_test_cmp_short_graph () {
1919
git log --graph --pretty=short "$@" >output &&
2020
sanitize_log_output >output.sanitized <output &&
21-
test_i18ncmp expect output.sanitized
21+
test_cmp expect output.sanitized
2222
}
2323

2424
lib_test_cmp_colored_graph () {

t/t0000-basic.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ test_expect_success 'pretend we have a mix of all possible results' '
271271
EOF
272272
'
273273

274-
test_expect_success C_LOCALE_OUTPUT 'test --verbose' '
274+
test_expect_success 'test --verbose' '
275275
run_sub_test_lib_test_err \
276276
t1234-verbose "test verbose" --verbose <<-\EOF &&
277277
test_expect_success "passing test" true

t/t0006-date.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ check_relative() {
1111
echo "$t -> $2" >expect
1212
test_expect_${3:-success} "relative date ($2)" "
1313
test-tool date relative $t >actual &&
14-
test_i18ncmp expect actual
14+
test_cmp expect actual
1515
"
1616
}
1717

@@ -139,7 +139,7 @@ check_date_format_human() {
139139
echo "$t -> $2" >expect
140140
test_expect_success "human date $t" '
141141
test-tool date human $t >actual &&
142-
test_i18ncmp expect actual
142+
test_cmp expect actual
143143
'
144144
}
145145

t/t0008-ignores.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ expect_from_stdin () {
3434
test_stderr () {
3535
expected="$1"
3636
expect_in stderr "$1" &&
37-
test_i18ncmp "$HOME/expected-stderr" "$HOME/stderr"
37+
test_cmp "$HOME/expected-stderr" "$HOME/stderr"
3838
}
3939

4040
broken_c_unquote () {

t/t0012-help.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ test_expect_success "--help does not work for guides" "
5555
git: 'revisions' is not a git command. See 'git --help'.
5656
EOF
5757
test_must_fail git revisions --help 2>actual &&
58-
test_i18ncmp expect actual
58+
test_cmp expect actual
5959
"
6060

6161
test_expect_success 'git help' '

t/t0018-advice.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ test_expect_success 'advice should be printed when config variable is unset' '
1010
hint: Disable this message with "git config advice.nestedTag false"
1111
EOF
1212
test-tool advise "This is a piece of advice" 2>actual &&
13-
test_i18ncmp expect actual
13+
test_cmp expect actual
1414
'
1515

1616
test_expect_success 'advice should be printed when config variable is set to true' '
@@ -20,7 +20,7 @@ test_expect_success 'advice should be printed when config variable is set to tru
2020
EOF
2121
test_config advice.nestedTag true &&
2222
test-tool advise "This is a piece of advice" 2>actual &&
23-
test_i18ncmp expect actual
23+
test_cmp expect actual
2424
'
2525

2626
test_expect_success 'advice should not be printed when config variable is set to false' '

t/t0020-crlf.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ test_expect_success 'safecrlf: print warning only once' '
8787
git commit -m "nowarn" &&
8888
for w in Oh here is CRLFQ in text; do echo $w; done | q_to_cr >doublewarn &&
8989
git add doublewarn 2>err &&
90-
if test_have_prereq C_LOCALE_OUTPUT
91-
then
92-
test $(grep "CRLF will be replaced by LF" err | wc -l) = 1
93-
fi
90+
grep "CRLF will be replaced by LF" err >err.warnings &&
91+
test_line_count = 1 err.warnings
9492
'
9593

9694

t/t0027-auto-crlf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ check_warning () {
8383
*) echo >&2 "Illegal 1": "$1" ; return false ;;
8484
esac
8585
grep "will be replaced by" "$2" | sed -e "s/\(.*\) in [^ ]*$/\1/" | uniq >"$2".actual
86-
test_i18ncmp "$2".expect "$2".actual
86+
test_cmp "$2".expect "$2".actual
8787
}
8888

8989
commit_check_warn () {

t/t0040-parse-options.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ EOF
6161
test_expect_success 'test help' '
6262
test_must_fail test-tool parse-options -h >output 2>output.err &&
6363
test_must_be_empty output.err &&
64-
test_i18ncmp expect output
64+
test_cmp expect output
6565
'
6666

6767
mv expect expect.err
@@ -84,7 +84,7 @@ check_unknown_i18n() {
8484
cat expect.err >>expect &&
8585
test_must_fail test-tool parse-options $* >output 2>output.err &&
8686
test_must_be_empty output &&
87-
test_i18ncmp expect output.err
87+
test_cmp expect output.err
8888
}
8989

9090
test_expect_success 'OPT_BOOL() #1' 'check boolean: 1 --yes'
@@ -250,7 +250,7 @@ EOF
250250
test_expect_success 'detect possible typos' '
251251
test_must_fail test-tool parse-options -boolean >output 2>output.err &&
252252
test_must_be_empty output &&
253-
test_i18ncmp typo.err output.err
253+
test_cmp typo.err output.err
254254
'
255255

256256
cat >typo.err <<\EOF
@@ -260,7 +260,7 @@ EOF
260260
test_expect_success 'detect possible typos' '
261261
test_must_fail test-tool parse-options -ambiguous >output 2>output.err &&
262262
test_must_be_empty output &&
263-
test_i18ncmp typo.err output.err
263+
test_cmp typo.err output.err
264264
'
265265

266266
test_expect_success 'keep some options as arguments' '

0 commit comments

Comments
 (0)