mirror of
https://github.com/git/git.git
synced 2024-11-13 20:53:02 +01:00
27 lines
376 B
Bash
27 lines
376 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
test_description='rewrite diff'
|
||
|
|
||
|
. ./test-lib.sh
|
||
|
|
||
|
test_expect_success setup '
|
||
|
|
||
|
cat ../../COPYING >test &&
|
||
|
git add test &&
|
||
|
tr 'a-zA-Z' 'n-za-mN-ZA-M' <../../COPYING >test
|
||
|
|
||
|
'
|
||
|
|
||
|
test_expect_success 'detect rewrite' '
|
||
|
|
||
|
actual=$(git diff-files -B --summary test) &&
|
||
|
expr "$actual" : " rewrite test ([0-9]*%)$" || {
|
||
|
echo "Eh? <<$actual>>"
|
||
|
false
|
||
|
}
|
||
|
|
||
|
'
|
||
|
|
||
|
test_done
|
||
|
|