@@ -41,19 +41,19 @@ test_expect_success PERL 'custom commands' '
41
41
test_config difftool.test-tool.cmd "cat \"\$REMOTE\"" &&
42
42
echo master >expect &&
43
43
git difftool --no-prompt branch >actual &&
44
- test_cmp expect actual &&
44
+ test_cmp_text expect actual &&
45
45
46
46
test_config difftool.test-tool.cmd "cat \"\$LOCAL\"" &&
47
47
echo branch >expect &&
48
48
git difftool --no-prompt branch >actual &&
49
- test_cmp expect actual
49
+ test_cmp_text expect actual
50
50
'
51
51
52
52
test_expect_success PERL ' custom tool commands override built-ins' '
53
53
test_config difftool.vimdiff.cmd "cat \"\$REMOTE\"" &&
54
54
echo master >expect &&
55
55
git difftool --tool vimdiff --no-prompt branch >actual &&
56
- test_cmp expect actual
56
+ test_cmp_text expect actual
57
57
'
58
58
59
59
test_expect_success PERL ' difftool ignores bad --tool values' '
@@ -84,7 +84,7 @@ test_expect_success PERL 'difftool honors --gui' '
84
84
85
85
echo branch >expect &&
86
86
git difftool --no-prompt --gui branch >actual &&
87
- test_cmp expect actual
87
+ test_cmp_text expect actual
88
88
'
89
89
90
90
test_expect_success PERL ' difftool --gui last setting wins' '
@@ -98,14 +98,14 @@ test_expect_success PERL 'difftool --gui last setting wins' '
98
98
test_config diff.guitool test-tool &&
99
99
echo branch >expect &&
100
100
git difftool --no-prompt --no-gui --gui branch >actual &&
101
- test_cmp expect actual
101
+ test_cmp_text expect actual
102
102
'
103
103
104
104
test_expect_success PERL ' difftool --gui works without configured diff.guitool' '
105
105
difftool_test_setup &&
106
106
echo branch >expect &&
107
107
git difftool --no-prompt --gui branch >actual &&
108
- test_cmp expect actual
108
+ test_cmp_text expect actual
109
109
'
110
110
111
111
# Specify the diff tool using $GIT_DIFF_TOOL
@@ -114,7 +114,7 @@ test_expect_success PERL 'GIT_DIFF_TOOL variable' '
114
114
git config --unset diff.tool &&
115
115
echo branch >expect &&
116
116
GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual &&
117
- test_cmp expect actual
117
+ test_cmp_text expect actual
118
118
'
119
119
120
120
# Test the $GIT_*_TOOL variables and ensure
@@ -126,13 +126,13 @@ test_expect_success PERL 'GIT_DIFF_TOOL overrides' '
126
126
127
127
echo branch >expect &&
128
128
GIT_DIFF_TOOL=test-tool git difftool --no-prompt branch >actual &&
129
- test_cmp expect actual &&
129
+ test_cmp_text expect actual &&
130
130
131
131
test_config diff.tool bogus-tool &&
132
132
test_config merge.tool bogus-tool &&
133
133
GIT_DIFF_TOOL=bogus-tool \
134
134
git difftool --no-prompt --tool=test-tool branch >actual &&
135
- test_cmp expect actual
135
+ test_cmp_text expect actual
136
136
'
137
137
138
138
# 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' '
141
141
difftool_test_setup &&
142
142
echo branch >expect &&
143
143
GIT_DIFFTOOL_NO_PROMPT=true git difftool branch >actual &&
144
- test_cmp expect actual
144
+ test_cmp_text expect actual
145
145
'
146
146
147
147
# git-difftool supports the difftool.prompt variable.
@@ -161,7 +161,7 @@ test_expect_success PERL 'difftool.prompt config variable is false' '
161
161
test_config difftool.prompt false &&
162
162
echo branch >expect &&
163
163
git difftool branch >actual &&
164
- test_cmp expect actual
164
+ test_cmp_text expect actual
165
165
'
166
166
167
167
# 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' '
171
171
test_config mergetool.prompt false &&
172
172
echo branch >expect &&
173
173
git difftool branch >actual &&
174
- test_cmp expect actual
174
+ test_cmp_text expect actual
175
175
'
176
176
177
177
# Test that the -y flag can override difftool.prompt = true
@@ -180,7 +180,7 @@ test_expect_success PERL 'difftool.prompt can overridden with -y' '
180
180
test_config difftool.prompt true &&
181
181
echo branch >expect &&
182
182
git difftool -y branch >actual &&
183
- test_cmp expect actual
183
+ test_cmp_text expect actual
184
184
'
185
185
186
186
# Test that the --prompt flag can override difftool.prompt = false
@@ -198,7 +198,7 @@ test_expect_success PERL 'difftool last flag wins' '
198
198
difftool_test_setup &&
199
199
echo branch >expect &&
200
200
git difftool --prompt --no-prompt branch >actual &&
201
- test_cmp expect actual &&
201
+ test_cmp_text expect actual &&
202
202
echo >input &&
203
203
git difftool --no-prompt --prompt branch <input >output &&
204
204
prompt=$(tail -1 <output) &&
@@ -212,13 +212,13 @@ test_expect_success PERL 'difftool + mergetool config variables' '
212
212
test_config mergetool.test-tool.cmd "cat \$LOCAL" &&
213
213
echo branch >expect &&
214
214
git difftool --no-prompt branch >actual &&
215
- test_cmp expect actual &&
215
+ test_cmp_text expect actual &&
216
216
217
217
# set merge.tool to something bogus, diff.tool to test-tool
218
218
test_config merge.tool bogus-tool &&
219
219
test_config diff.tool test-tool &&
220
220
git difftool --no-prompt branch >actual &&
221
- test_cmp expect actual
221
+ test_cmp_text expect actual
222
222
'
223
223
224
224
test_expect_success PERL ' difftool.<tool>.path' '
@@ -232,21 +232,21 @@ test_expect_success PERL 'difftool --extcmd=cat' '
232
232
echo branch >expect &&
233
233
echo master >>expect &&
234
234
git difftool --no-prompt --extcmd=cat branch >actual &&
235
- test_cmp expect actual
235
+ test_cmp_text expect actual
236
236
'
237
237
238
238
test_expect_success PERL ' difftool --extcmd cat' '
239
239
echo branch >expect &&
240
240
echo master >>expect &&
241
241
git difftool --no-prompt --extcmd=cat branch >actual &&
242
- test_cmp expect actual
242
+ test_cmp_text expect actual
243
243
'
244
244
245
245
test_expect_success PERL ' difftool -x cat' '
246
246
echo branch >expect &&
247
247
echo master >>expect &&
248
248
git difftool --no-prompt -x cat branch >actual &&
249
- test_cmp expect actual
249
+ test_cmp_text expect actual
250
250
'
251
251
252
252
test_expect_success PERL ' difftool --extcmd echo arg1' '
@@ -260,14 +260,14 @@ test_expect_success PERL 'difftool --extcmd cat arg1' '
260
260
echo master >expect &&
261
261
git difftool --no-prompt \
262
262
--extcmd sh\ -c\ \"cat\ \$1\" branch >actual &&
263
- test_cmp expect actual
263
+ test_cmp_text expect actual
264
264
'
265
265
266
266
test_expect_success PERL ' difftool --extcmd cat arg2' '
267
267
echo branch >expect &&
268
268
git difftool --no-prompt \
269
269
--extcmd sh\ -c\ \"cat\ \$2\" branch >actual &&
270
- test_cmp expect actual
270
+ test_cmp_text expect actual
271
271
'
272
272
273
273
# Create a second file on master and a different version on branch
0 commit comments