Merge branch 'pb/gitweb-tagcloud' into pb/gitweb
[gitweb.git] / t / t4018-diff-funcname.sh
index 602d68f092926ac612f4fe3bca17951fcde3cea9..520e095c597a61f0f263a274a53ae0aa2781da85 100755 (executable)
@@ -32,7 +32,18 @@ EOF
 
 sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
 
+builtin_patterns="bibtex html java pascal php python ruby tex"
+for p in $builtin_patterns
+do
+       test_expect_success "builtin $p pattern compiles" '
+               echo "*.java diff=$p" > .gitattributes &&
+               ! ( git diff --no-index Beer.java Beer-correct.java 2>&1 |
+                       grep "fatal" > /dev/null )
+       '
+done
+
 test_expect_success 'default behaviour' '
+       rm -f .gitattributes &&
        git diff --no-index Beer.java Beer-correct.java |
        grep "^@@.*@@ public class Beer"
 '