Code

Merge branch 'master' of git://linux-nfs.org/~bfields/git
[git.git] / t / t4015-diff-whitespace.sh
index c945085245b4d41405f18b22c447c004c36cf132..adf4993bacf05b4ccb0b447910dda6a2c453bc83 100755 (executable)
@@ -51,13 +51,13 @@ test_expect_success "Ray's example with -w" 'diff -u expect out'
 git-diff -b > out
 test_expect_success "Ray's example with -b" 'diff -u expect out'
 
-cat << EOF > x
+tr 'Q' '\015' << EOF > x
 whitespace at beginning
 whitespace change
 whitespace in the middle
 whitespace at end
 unchanged line
-CR at end\r
+CR at endQ
 EOF
 
 git-update-index x
@@ -71,7 +71,7 @@ unchanged line
 CR at end
 EOF
 
-cat << EOF > expect
+tr 'Q' '\015' << EOF > expect
 diff --git a/x b/x
 index d99af23..8b32fb5 100644
 --- a/x
@@ -86,7 +86,7 @@ index d99af23..8b32fb5 100644
 +white space in the middle
 +whitespace at end  
  unchanged line
--CR at end\r
+-CR at endQ
 +CR at end
 EOF
 git-diff > out
@@ -99,7 +99,7 @@ EOF
 git-diff -w > out
 test_expect_success 'another test, with -w' 'diff -u expect out'
 
-cat << EOF > expect
+tr 'Q' '\015' << EOF > expect
 diff --git a/x b/x
 index d99af23..8b32fb5 100644
 --- a/x
@@ -109,12 +109,10 @@ index d99af23..8b32fb5 100644
 +      whitespace at beginning
  whitespace change
 -whitespace in the middle
--whitespace at end
 +white space in the middle
-+whitespace at end  
+ whitespace at end
  unchanged line
--CR at end\r
-+CR at end
+ CR at endQ
 EOF
 git-diff -b > out
 test_expect_success 'another test, with -b' 'diff -u expect out'