summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-09-22 18:19:05 -0500
committerJunio C Hamano <gitster@pobox.com>2008-09-22 19:59:23 -0700
commite3bf5e43fd9db9391ebc876ef118dbb431853d69 (patch)
tree41e5c2d7bd51f61afbb9bd46bf4e3264f3b63b67
parent96d1a8e9d44fd635fad8466dbe0aab6d73495c9f (diff)
downloadgit-e3bf5e43fd9db9391ebc876ef118dbb431853d69.tar.gz
t4018-diff-funcname: test syntax of builtin xfuncname patterns
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t4018-diff-funcname.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 602d68f092..99fff973eb 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"
'