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 <patthoyts@users.sourceforge.net>
This commit is contained in:
Pat Thoyts
2013-05-31 10:58:25 +01:00
committed by Johannes Schindelin
parent b530e4bf39
commit d813621f8d

View File

@@ -253,7 +253,7 @@ test_expect_success PERL 'difftool --extcmd echo arg1' '
echo file >expect &&
git difftool --no-prompt \
--extcmd sh\ -c\ \"echo\ \$1\" branch >actual &&
test_cmp expect actual
test_cmp_text expect actual
'
test_expect_success PERL 'difftool --extcmd cat arg1' '
@@ -394,14 +394,14 @@ run_dir_diff_test 'difftool --dir-diff syncs worktree with unstaged change' '
echo "orig content" >file &&
git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch &&
echo "new content" >expect &&
test_cmp expect file
test_cmp_text expect file
'
run_dir_diff_test 'difftool --dir-diff syncs worktree without unstaged change' '
test_when_finished git reset --hard &&
git difftool -d $symlinks --extcmd "$(pwd)/modify-right-file" branch &&
echo "new content" >expect &&
test_cmp expect file
test_cmp_text expect file
'
write_script modify-file <<\EOF
@@ -412,7 +412,7 @@ test_expect_success PERL 'difftool --no-symlinks does not overwrite working tree
echo "orig content" >file &&
git difftool --dir-diff --no-symlinks --extcmd "$(pwd)/modify-file" branch &&
echo "new content" >expect &&
test_cmp expect file
test_cmp_text expect file
'
write_script modify-both-files <<\EOF
@@ -428,9 +428,9 @@ test_expect_success PERL 'difftool --no-symlinks detects conflict ' '
echo "orig content" >file &&
test_must_fail git difftool --dir-diff --no-symlinks --extcmd "$(pwd)/modify-both-files" branch &&
echo "wt content" >expect &&
test_cmp expect file &&
test_cmp_text expect file &&
echo "tmp content" >expect &&
test_cmp expect "$(cat tmpdir)/file"
test_cmp_text expect "$(cat tmpdir)/file"
)
'