blob: bf996fc414d3b5ea16488a8b274973a8347b29cb [file] [log] [blame]
Junio C Hamanof8b68092007-11-21 23:06:44 -08001#!/bin/sh
2
3test_description='rewrite diff'
4
5. ./test-lib.sh
6
7test_expect_success setup '
8
9 cat ../../COPYING >test &&
10 git add test &&
Jeff King40a7ce62008-03-12 17:29:57 -040011 tr \
12 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" \
13 "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \
14 <../../COPYING >test
Junio C Hamanof8b68092007-11-21 23:06:44 -080015
16'
17
18test_expect_success 'detect rewrite' '
19
20 actual=$(git diff-files -B --summary test) &&
21 expr "$actual" : " rewrite test ([0-9]*%)$" || {
22 echo "Eh? <<$actual>>"
23 false
24 }
25
26'
27
28test_done
29