Skip to content

Commit 55e7c0a

Browse files
committed
(squash) test for previous
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2564aa4 commit 55e7c0a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

t/t8006-blame-textconv.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ EOF
1515
chmod +x helper
1616

1717
test_expect_success 'setup ' '
18+
echo "bin: test number 0" >zero.bin &&
1819
echo "bin: test 1" >one.bin &&
1920
echo "bin: test number 2" >two.bin &&
2021
if test_have_prereq SYMLINKS; then
@@ -42,6 +43,7 @@ test_expect_success 'no filter specified' '
4243

4344
test_expect_success 'setup textconv filters' '
4445
echo "*.bin diff=test" >.gitattributes &&
46+
echo "zero.bin eol=crlf" >>.gitattributes &&
4547
git config diff.test.textconv ./helper &&
4648
git config diff.test.cachetextconv false
4749
'
@@ -73,6 +75,15 @@ test_expect_success 'blame --textconv going through revisions' '
7375
test_cmp expected result
7476
'
7577

78+
test_expect_success 'blame --textconv with local changes' '
79+
test_when_finished "git checkout zero.bin" &&
80+
printf "bin: updated number 0\015" >zero.bin &&
81+
git blame --textconv zero.bin >blame &&
82+
expect="(Not Committed Yet ....-..-.. ..:..:.. +0000 1)" &&
83+
expect="$expect converted: updated number 0" &&
84+
expr "$(find_blame <blame)" : "^$expect"
85+
'
86+
7687
test_expect_success 'make a new commit' '
7788
echo "bin: test number 2 version 3" >>two.bin &&
7889
GIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"

0 commit comments

Comments
 (0)