Make "insert_by_date()" match "commit_list_insert()"
[git/jrn.git] / t / t4006-diff-mode.sh
blob90fd21ff1f0fd892b649e0b2fc73844e14cb0ee2
1 #!/bin/sh
3 # Copyright (c) 2005 Junio C Hamano
6 test_description='Test mode change diffs.
9 . ./test-lib.sh
11 test_expect_success \
12 'setup' \
13 'echo frotz >rezrov &&
14 git-update-cache --add rezrov &&
15 tree=`git-write-tree` &&
16 echo $tree'
18 test_expect_success \
19 'chmod' \
20 'chmod +x rezrov &&
21 git-update-cache rezrov &&
22 git-diff-cache $tree >current'
24 _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
25 _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
26 sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current >check
27 echo ":100644 100755 X X M rezrov" >expected
29 test_expect_success \
30 'verify' \
31 'diff -u expected check'
33 test_done