]> Pileus Git - ~andy/git/blobdiff - t/t0003-attributes.sh
Merge git://git.kernel.org/pub/scm/gitk/gitk
[~andy/git] / t / t0003-attributes.sh
index 47f08a46c260a612eff2bcf88bef84ee231897c1..c56d2fbabaa0fdd90547ce8b629a629c21fbbc0e 100755 (executable)
@@ -11,7 +11,7 @@ attr_check () {
 
        git check-attr test -- "$path" >actual &&
        echo "$path: test: $2" >expect &&
-       diff -u expect actual
+       test_cmp expect actual
 
 }
 
@@ -21,6 +21,7 @@ test_expect_success 'setup' '
        mkdir -p a/b/d a/c &&
        (
                echo "f test=f"
+               echo "a/i test=a/i"
        ) >.gitattributes &&
        (
                echo "g test=a/g" &&
@@ -46,4 +47,11 @@ test_expect_success 'attribute test' '
 
 '
 
+test_expect_success 'root subdir attribute test' '
+
+       attr_check a/i a/i &&
+       attr_check subdir/a/i unspecified
+
+'
+
 test_done