Imported Upstream version 1.8.1.3
[platform/upstream/git.git] / t / t0003-attributes.sh
index febc45c..807b8b8 100755 (executable)
@@ -196,6 +196,16 @@ test_expect_success 'root subdir attribute test' '
        attr_check subdir/a/i unspecified
 '
 
+test_expect_success 'negative patterns' '
+       echo "!f test=bar" >.gitattributes &&
+       test_must_fail git check-attr test -- f
+'
+
+test_expect_success 'patterns starting with exclamation' '
+       echo "\!f test=foo" >.gitattributes &&
+       attr_check "!f" foo
+'
+
 test_expect_success 'setup bare' '
        git clone --bare . bare.git &&
        cd bare.git