Skip to content

Commit

Permalink
t4018-diff-funcname: test syntax of builtin xfuncname patterns
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Sep 23, 2008
1 parent 96d1a8e commit e3bf5e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions t/t4018-diff-funcname.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
'
Expand Down

0 comments on commit e3bf5e4

Please sign in to comment.