@@ -41,19 +41,19 @@ test_expect_success PERL 'custom commands' '
4141 test_config difftool.test-tool.cmd "cat \"\$REMOTE\"" &&
4242 echo master >expect &&
4343 git difftool --no-prompt branch >actual &&
44- test_cmp expect actual &&
44+ test_cmp_text expect actual &&
4545
4646 test_config difftool.test-tool.cmd "cat \"\$LOCAL\"" &&
4747 echo branch >expect &&
4848 git difftool --no-prompt branch >actual &&
49- test_cmp expect actual
49+ test_cmp_text expect actual
5050'
5151
5252test_expect_success PERL ' custom tool commands override built-ins' '
5353 test_config difftool.vimdiff.cmd "cat \"\$REMOTE\"" &&
5454 echo master >expect &&
5555 git difftool --tool vimdiff --no-prompt branch >actual &&
56- test_cmp expect actual
56+ test_cmp_text expect actual
5757'
5858
5959test_expect_success PERL ' difftool ignores bad --tool values' '
@@ -84,7 +84,7 @@ test_expect_success PERL 'difftool honors --gui' '
8484
8585 echo branch >expect &&
8686 git difftool --no-prompt --gui branch >actual &&
87- test_cmp expect actual
87+ test_cmp_text expect actual
8888'
8989
9090test_expect_success PERL ' difftool --gui last setting wins' '
@@ -98,14 +98,14 @@ test_expect_success PERL 'difftool --gui last setting wins' '
9898 test_config diff.guitool test-tool &&
9999 echo branch >expect &&
100100 git difftool --no-prompt --no-gui --gui branch >actual &&
101- test_cmp expect actual
101+ test_cmp_text expect actual
102102'
103103
104104test_expect_success PERL ' difftool --gui works without configured diff.guitool' '
105105 difftool_test_setup &&
106106 echo branch >expect &&
107107 git difftool --no-prompt --gui branch >actual &&
108- test_cmp expect actual
108+ test_cmp_text expect actual
109109'
110110
111111# Specify the diff tool using $GIT_DIFF_TOOL
@@ -114,7 +114,7 @@ test_expect_success PERL 'GIT_DIFF_TOOL variable' '
114114 git config --unset diff.tool &&
115115 echo branch >expect &&
116116 GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual &&
117- test_cmp expect actual
117+ test_cmp_text expect actual
118118'
119119
120120# Test the $GIT_*_TOOL variables and ensure
@@ -126,13 +126,13 @@ test_expect_success PERL 'GIT_DIFF_TOOL overrides' '
126126
127127 echo branch >expect &&
128128 GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual &&
129- test_cmp expect actual &&
129+ test_cmp_text expect actual &&
130130
131131 test_config diff.tool bogus-tool &&
132132 test_config merge.tool bogus-tool &&
133133 GIT_DIFF_TOOL=bogus-tool \
134134 git difftool --no-prompt --tool=test-tool branch >actual &&
135- test_cmp expect actual
135+ test_cmp_text expect actual
136136'
137137
138138# Test that we don't have to pass --no-prompt to difftool
@@ -141,7 +141,7 @@ test_expect_success PERL 'GIT_DIFFTOOL_NO_PROMPT variable' '
141141 difftool_test_setup &&
142142 echo branch >expect &&
143143 GIT_DIFFTOOL_NO_PROMPT=true git difftool branch >actual &&
144- test_cmp expect actual
144+ test_cmp_text expect actual
145145'
146146
147147# git-difftool supports the difftool.prompt variable.
@@ -161,7 +161,7 @@ test_expect_success PERL 'difftool.prompt config variable is false' '
161161 test_config difftool.prompt false &&
162162 echo branch >expect &&
163163 git difftool branch >actual &&
164- test_cmp expect actual
164+ test_cmp_text expect actual
165165'
166166
167167# Test that we don't have to pass --no-prompt when mergetool.prompt is false
@@ -171,7 +171,7 @@ test_expect_success PERL 'difftool merge.prompt = false' '
171171 test_config mergetool.prompt false &&
172172 echo branch >expect &&
173173 git difftool branch >actual &&
174- test_cmp expect actual
174+ test_cmp_text expect actual
175175'
176176
177177# Test that the -y flag can override difftool.prompt = true
@@ -180,7 +180,7 @@ test_expect_success PERL 'difftool.prompt can overridden with -y' '
180180 test_config difftool.prompt true &&
181181 echo branch >expect &&
182182 git difftool -y branch >actual &&
183- test_cmp expect actual
183+ test_cmp_text expect actual
184184'
185185
186186# Test that the --prompt flag can override difftool.prompt = false
@@ -198,7 +198,7 @@ test_expect_success PERL 'difftool last flag wins' '
198198 difftool_test_setup &&
199199 echo branch >expect &&
200200 git difftool --prompt --no-prompt branch >actual &&
201- test_cmp expect actual &&
201+ test_cmp_text expect actual &&
202202 echo >input &&
203203 git difftool --no-prompt --prompt branch <input >output &&
204204 prompt=$(tail -1 <output) &&
@@ -212,13 +212,13 @@ test_expect_success PERL 'difftool + mergetool config variables' '
212212 test_config mergetool.test-tool.cmd "cat \$LOCAL" &&
213213 echo branch >expect &&
214214 git difftool --no-prompt branch >actual &&
215- test_cmp expect actual &&
215+ test_cmp_text expect actual &&
216216
217217 # set merge.tool to something bogus, diff.tool to test-tool
218218 test_config merge.tool bogus-tool &&
219219 test_config diff.tool test-tool &&
220220 git difftool --no-prompt branch >actual &&
221- test_cmp expect actual
221+ test_cmp_text expect actual
222222'
223223
224224test_expect_success PERL ' difftool.<tool>.path' '
@@ -232,21 +232,21 @@ test_expect_success PERL 'difftool --extcmd=cat' '
232232 echo branch >expect &&
233233 echo master >>expect &&
234234 git difftool --no-prompt --extcmd=cat branch >actual &&
235- test_cmp expect actual
235+ test_cmp_text expect actual
236236'
237237
238238test_expect_success PERL ' difftool --extcmd cat' '
239239 echo branch >expect &&
240240 echo master >>expect &&
241241 git difftool --no-prompt --extcmd=cat branch >actual &&
242- test_cmp expect actual
242+ test_cmp_text expect actual
243243'
244244
245245test_expect_success PERL ' difftool -x cat' '
246246 echo branch >expect &&
247247 echo master >>expect &&
248248 git difftool --no-prompt -x cat branch >actual &&
249- test_cmp expect actual
249+ test_cmp_text expect actual
250250'
251251
252252test_expect_success PERL ' difftool --extcmd echo arg1' '
@@ -260,14 +260,14 @@ test_expect_success PERL 'difftool --extcmd cat arg1' '
260260 echo master >expect &&
261261 git difftool --no-prompt \
262262 --extcmd sh\ -c\ \"cat\ \$1\" branch >actual &&
263- test_cmp expect actual
263+ test_cmp_text expect actual
264264'
265265
266266test_expect_success PERL ' difftool --extcmd cat arg2' '
267267 echo branch >expect &&
268268 git difftool --no-prompt \
269269 --extcmd sh\ -c\ \"cat\ \$2\" branch >actual &&
270- test_cmp expect actual
270+ test_cmp_text expect actual
271271'
272272
273273# Create a second file on master and a different version on branch
0 commit comments