Skip to content

Commit 1108cea

Browse files
avargitster
authored andcommitted
tests: remove most uses of test_i18ncmp
As a follow-up to d162b25 (tests: remove support for GIT_TEST_GETTEXT_POISON, 2021-01-20) remove most uses of test_i18ncmp via a simple s/test_i18ncmp/test_cmp/g search-replacement. I'm leaving t6300-for-each-ref.sh out due to a conflict with in-flight changes between "master" and "seen", as well as the prerequisite itself due to other changes between "master" and "next/seen" which add new test_i18ncmp uses. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b1e0798 commit 1108cea

File tree

90 files changed

+415
-415
lines changed

Some content is hidden

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

90 files changed

+415
-415
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/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/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' '

t/t0201-gettext-fallbacks.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,41 @@ test_expect_success 'sanity: $GIT_INTERNAL_GETTEXT_SH_SCHEME" is fallthrough' '
2727
test_expect_success 'gettext: our gettext() fallback has pass-through semantics' '
2828
printf "test" >expect &&
2929
gettext "test" >actual &&
30-
test_i18ncmp expect actual &&
30+
test_cmp expect actual &&
3131
printf "test more words" >expect &&
3232
gettext "test more words" >actual &&
33-
test_i18ncmp expect actual
33+
test_cmp expect actual
3434
'
3535

3636
test_expect_success 'eval_gettext: our eval_gettext() fallback has pass-through semantics' '
3737
printf "test" >expect &&
3838
eval_gettext "test" >actual &&
39-
test_i18ncmp expect actual &&
39+
test_cmp expect actual &&
4040
printf "test more words" >expect &&
4141
eval_gettext "test more words" >actual &&
42-
test_i18ncmp expect actual
42+
test_cmp expect actual
4343
'
4444

4545
test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables' '
4646
printf "test YesPlease" >expect &&
4747
GIT_INTERNAL_GETTEXT_TEST_FALLBACKS=YesPlease eval_gettext "test \$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS" >actual &&
48-
test_i18ncmp expect actual
48+
test_cmp expect actual
4949
'
5050

5151
test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables with spaces' '
5252
cmdline="git am" &&
5353
export cmdline &&
5454
printf "When you have resolved this problem, run git am --resolved." >expect &&
5555
eval_gettext "When you have resolved this problem, run \$cmdline --resolved." >actual &&
56-
test_i18ncmp expect actual
56+
test_cmp expect actual
5757
'
5858

5959
test_expect_success 'eval_gettext: our eval_gettext() fallback can interpolate variables with spaces and quotes' '
6060
cmdline="git am" &&
6161
export cmdline &&
6262
printf "When you have resolved this problem, run \"git am --resolved\"." >expect &&
6363
eval_gettext "When you have resolved this problem, run \"\$cmdline --resolved\"." >actual &&
64-
test_i18ncmp expect actual
64+
test_cmp expect actual
6565
'
6666

6767
test_done

t/t0300-credentials.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ test_expect_success 'helpers can abort the process' '
578578
quit: host=example.com
579579
fatal: credential helper '\''quit'\'' told us to quit
580580
EOF
581-
test_i18ncmp expect stderr
581+
test_cmp expect stderr
582582
'
583583

584584
test_expect_success 'empty helper spec resets helper list' '
@@ -606,7 +606,7 @@ test_expect_success 'url parser rejects embedded newlines' '
606606
warning: url contains a newline in its path component: https://one.example.com?%0ahost=two.example.com/
607607
fatal: credential url cannot be parsed: https://one.example.com?%0ahost=two.example.com/
608608
EOF
609-
test_i18ncmp expect stderr
609+
test_cmp expect stderr
610610
'
611611

612612
test_expect_success 'host-less URLs are parsed as empty host' '
@@ -633,7 +633,7 @@ test_expect_success 'credential system refuses to work with missing host' '
633633
cat >expect <<-\EOF &&
634634
fatal: refusing to work with credential missing host field
635635
EOF
636-
test_i18ncmp expect stderr
636+
test_cmp expect stderr
637637
'
638638

639639
test_expect_success 'credential system refuses to work with missing protocol' '
@@ -643,7 +643,7 @@ test_expect_success 'credential system refuses to work with missing protocol' '
643643
cat >expect <<-\EOF &&
644644
fatal: refusing to work with credential missing protocol field
645645
EOF
646-
test_i18ncmp expect stderr
646+
test_cmp expect stderr
647647
'
648648

649649
# usage: check_host_and_path <url> <expected-host> <expected-path>

0 commit comments

Comments
 (0)