3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='Test mode change diffs.
13 'echo frotz >rezrov &&
14 git update-index --add rezrov &&
15 tree=`git write-tree` &&
20 'test_chmod +x rezrov &&
21 git diff-index $tree >current'
23 _x40
='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
24 _x40
="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
25 sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current
>check
26 echo ":100644 100755 X X M rezrov" >expected
30 'test_cmp expected check'