From: Brandon Casey Date: Mon, 22 Sep 2008 23:19:05 +0000 (-0500) Subject: t4018-diff-funcname: test syntax of builtin xfuncname patterns X-Git-Tag: v1.6.0.3~52^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e3bf5e43;p=git.git t4018-diff-funcname: test syntax of builtin xfuncname patterns Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh index 602d68f09..99fff973e 100755 --- a/t/t4018-diff-funcname.sh +++ b/t/t4018-diff-funcname.sh @@ -32,7 +32,18 @@ EOF sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java +builtin_patterns="bibtex java pascal 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" '