3 # Copyright (c) 2006 Johannes E. Schindelin
6 test_description='Test special whitespace in diff engine.
12 # Ray Lehtiniemi's example
20 git-update-index --add x
32 index adf3937..6edc172 100644
46 test_expect_success "Ray's example without options" 'diff -u expect out'
49 test_expect_success "Ray's example with -w" 'diff -u expect out'
52 test_expect_success "Ray's example with -b" 'diff -u expect out'
54 tr 'Q' '\015' << EOF > x
55 whitespace at beginning
57 whitespace in the middle
66 whitespace at beginning
68 white space in the middle
74 tr 'Q' '\015' << EOF > expect
76 index d99af23..8b32fb5 100644
80 -whitespace at beginning
82 -whitespace in the middle
84 + whitespace at beginning
86 +white space in the middle
93 test_expect_success 'another test, without options' 'diff -u expect out'
97 index d99af23..8b32fb5 100644
100 test_expect_success 'another test, with -w' 'diff -u expect out'
102 tr 'Q' '\015' << EOF > expect
104 index d99af23..8b32fb5 100644
108 -whitespace at beginning
109 + whitespace at beginning
111 -whitespace in the middle
112 +white space in the middle
118 test_expect_success 'another test, with -b' 'diff -u expect out'