Bigfile: teach "git add" to send a large file straight to a pack
[gitweb.git] / t / t0025-crlf-auto.sh
index 2c9833800e253b73dcc453fd37861b18d0319363..f5f67a6337320c11a285b78be299fa955663991d 100755 (executable)
@@ -39,8 +39,9 @@ test_expect_success 'default settings cause no changes' '
        test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
 '
 
-test_expect_failure 'crlf=true causes a CRLF file to be normalized' '
+test_expect_success 'crlf=true causes a CRLF file to be normalized' '
 
+       # Backwards compatibility check
        rm -f .gitattributes tmp one two three &&
        echo "two crlf" > .gitattributes &&
        git read-tree --reset -u HEAD &&
@@ -51,7 +52,19 @@ test_expect_failure 'crlf=true causes a CRLF file to be normalized' '
        test -n "$twodiff"
 '
 
-test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '
+test_expect_success 'text=true causes a CRLF file to be normalized' '
+
+       rm -f .gitattributes tmp one two three &&
+       echo "two text" > .gitattributes &&
+       git read-tree --reset -u HEAD &&
+
+       # Note, "normalized" means that git will normalize it if added
+       has_cr two &&
+       twodiff=`git diff two` &&
+       test -n "$twodiff"
+'
+
+test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=false' '
 
        rm -f .gitattributes tmp one two three &&
        git config core.autocrlf false &&
@@ -63,7 +76,7 @@ test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=false'
        test -z "$onediff"
 '
 
-test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=input' '
+test_expect_success 'eol=crlf gives a normalized file CRLFs with autocrlf=input' '
 
        rm -f .gitattributes tmp one two three &&
        git config core.autocrlf input &&
@@ -75,7 +88,7 @@ test_expect_failure 'eol=crlf gives a normalized file CRLFs with autocrlf=input'
        test -z "$onediff"
 '
 
-test_expect_failure 'eol=lf gives a normalized file LFs with autocrlf=true' '
+test_expect_success 'eol=lf gives a normalized file LFs with autocrlf=true' '
 
        rm -f .gitattributes tmp one two three &&
        git config core.autocrlf true &&
@@ -101,11 +114,11 @@ test_expect_success 'autocrlf=true does not normalize CRLF files' '
        test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
 '
 
-test_expect_failure 'crlf=auto, autocrlf=true _does_ normalize CRLF files' '
+test_expect_success 'text=auto, autocrlf=true _does_ normalize CRLF files' '
 
        rm -f .gitattributes tmp one two three &&
        git config core.autocrlf true &&
-       echo "* crlf=auto" > .gitattributes &&
+       echo "* text=auto" > .gitattributes &&
        git read-tree --reset -u HEAD &&
 
        has_cr one &&
@@ -116,11 +129,11 @@ test_expect_failure 'crlf=auto, autocrlf=true _does_ normalize CRLF files' '
        test -z "$onediff" -a -n "$twodiff" -a -z "$threediff"
 '
 
-test_expect_success 'crlf=auto, autocrlf=true does not normalize binary files' '
+test_expect_success 'text=auto, autocrlf=true does not normalize binary files' '
 
        rm -f .gitattributes tmp one two three &&
        git config core.autocrlf true &&
-       echo "* crlf=auto" > .gitattributes &&
+       echo "* text=auto" > .gitattributes &&
        git read-tree --reset -u HEAD &&
 
        ! has_cr three &&
@@ -128,7 +141,7 @@ test_expect_success 'crlf=auto, autocrlf=true does not normalize binary files' '
        test -z "$threediff"
 '
 
-test_expect_failure 'eol=crlf _does_ normalize binary files' '
+test_expect_success 'eol=crlf _does_ normalize binary files' '
 
        rm -f .gitattributes tmp one two three &&
        echo "three eol=crlf" > .gitattributes &&