Git 2.4.9
[gitweb.git] / t / t8003-blame-corner-cases.sh
index 32895e5acba8d246539d3bd97fe7305827f18aa7..16f1442c1e6e4780dc10474a3fbf516841468c9f 100755 (executable)
@@ -191,12 +191,24 @@ test_expect_success 'indent of line numbers, ten lines' '
        test $(grep -c "  " actual) = 9
 '
 
-test_expect_success 'blaming files with CRLF newlines' '
+test_expect_success 'setup file with CRLF newlines' '
        git config core.autocrlf false &&
-       printf "testcase\r\n" >crlffile &&
+       printf "testcase\n" >crlffile &&
        git add crlffile &&
        git commit -m testcase &&
-       git -c core.autocrlf=input blame crlffile >actual &&
+       printf "testcase\r\n" >crlffile
+'
+
+test_expect_success 'blame file with CRLF core.autocrlf true' '
+       git config core.autocrlf true &&
+       git blame crlffile >actual &&
+       grep "A U Thor" actual
+'
+
+test_expect_success 'blame file with CRLF attributes text' '
+       git config core.autocrlf false &&
+       echo "crlffile text" >.gitattributes &&
+       git blame crlffile >actual &&
        grep "A U Thor" actual
 '