aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-26 00:27:30 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-26 00:27:30 -0700
commitb71fdc590d660f81e8e2ebfdab989feb60e86dde (patch)
treea73038255ad7ab3d43dfed19e47d3d410382bb86 /t
parentb2aa958dc29eb836a831138f6d84ad7cfadf4355 (diff)
parent4e218f54b3de6aa8ef7d15020c4507031a519f7d (diff)
downloadgit-b71fdc590d660f81e8e2ebfdab989feb60e86dde.tar.gz
git-b71fdc590d660f81e8e2ebfdab989feb60e86dde.tar.xz
Merge branch 'js/maint-diff-temp-smudge'
* js/maint-diff-temp-smudge: Smudge the files fed to external diff and textconv
Diffstat (limited to 't')
-rwxr-xr-xt/t4020-diff-external.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh
index 281680d95..f8c99f1a9 100755
--- a/t/t4020-diff-external.sh
+++ b/t/t4020-diff-external.sh
@@ -136,4 +136,20 @@ test_expect_success 'GIT_EXTERNAL_DIFF with more than one changed files' '
GIT_EXTERNAL_DIFF=echo git diff
'
+echo "#!$SHELL_PATH" >fake-diff.sh
+cat >> fake-diff.sh <<\EOF
+cat $2 >> crlfed.txt
+EOF
+chmod a+x fake-diff.sh
+
+keep_only_cr () {
+ tr -dc '\015'
+}
+
+test_expect_success 'external diff with autocrlf = true' '
+ git config core.autocrlf true &&
+ GIT_EXTERNAL_DIFF=./fake-diff.sh git diff &&
+ test $(wc -l < crlfed.txt) = $(cat crlfed.txt | keep_only_cr | wc -c)
+'
+
test_done