(squash) test for previous
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Oct 28, 2011 at 09:36 UTC
55e7c0aaa1b2c00d147b1b4b1aa88a71d90dacf4
1 file changed
+11
t/t8006-blame-textconv.sh
+11
@@ -15,6 +15,7 @@ EOF
15
chmod +x helper
16
17
test_expect_success 'setup ' '
18
+ echo "bin: test number 0" >zero.bin &&
19
echo "bin: test 1" >one.bin &&
20
echo "bin: test number 2" >two.bin &&
21
if test_have_prereq SYMLINKS; then
@@ -42,6 +43,7 @@ test_expect_success 'no filter specified' '
43
44
test_expect_success 'setup textconv filters' '
45
echo "*.bin diff=test" >.gitattributes &&
46
+ echo "zero.bin eol=crlf" >>.gitattributes &&
47
git config diff.test.textconv ./helper &&
48
git config diff.test.cachetextconv false
49
'
@@ -73,6 +75,15 @@ test_expect_success 'blame --textconv going through revisions' '
75
test_cmp expected result
76
'
77
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
+
87
test_expect_success 'make a new commit' '
88
echo "bin: test number 2 version 3" >>two.bin &&
89
GIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"