Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit d813621

Browse files
patthoytsdscho
authored andcommitted
t7800: a few tests should ignore crlf in checking the result.
Those tests that generate files using echo can expect crlf issues when run under windows. For such cases we use 'test_cmp_text'. Signed-off-by: Pat Thoyts <[email protected]>
1 parent b530e4b commit d813621

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/t7800-difftool.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ test_expect_success PERL 'difftool --extcmd echo arg1' '
253253
echo file >expect &&
254254
git difftool --no-prompt \
255255
--extcmd sh\ -c\ \"echo\ \$1\" branch >actual &&
256-
test_cmp expect actual
256+
test_cmp_text expect actual
257257
'
258258

259259
test_expect_success PERL 'difftool --extcmd cat arg1' '
@@ -394,14 +394,14 @@ run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' '
394394
echo "orig content" >file &&
395395
git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch &&
396396
echo "new content" >expect &&
397-
test_cmp expect file
397+
test_cmp_text expect file
398398
'
399399

400400
run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' '
401401
test_when_finished git reset --hard &&
402402
git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch &&
403403
echo "new content" >expect &&
404-
test_cmp expect file
404+
test_cmp_text expect file
405405
'
406406

407407
write_script modify-file <<\EOF
@@ -412,7 +412,7 @@ test_expect_success PERL 'difftool --no-symlinks does not overwrite working tree
412412
echo "orig content" >file &&
413413
git difftool --dir-diff --no-symlinks --extcmd "$(pwd)/modify-file" branch &&
414414
echo "new content" >expect &&
415-
test_cmp expect file
415+
test_cmp_text expect file
416416
'
417417

418418
write_script modify-both-files <<\EOF
@@ -428,9 +428,9 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '
428428
echo "orig content" >file &&
429429
test_must_fail git difftool --dir-diff --no-symlinks --extcmd "$(pwd)/modify-both-files" branch &&
430430
echo "wt content" >expect &&
431-
test_cmp expect file &&
431+
test_cmp_text expect file &&
432432
echo "tmp content" >expect &&
433-
test_cmp expect "$(cat tmpdir)/file"
433+
test_cmp_text expect "$(cat tmpdir)/file"
434434
)
435435
'
436436

0 commit comments

Comments
 (0)