summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16b2672)
raw | patch | inline | side by side (parent: 16b2672)
author | Brandon Casey <drafnel@gmail.com> | |
Thu, 16 Oct 2008 00:58:50 +0000 (19:58 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 16 Oct 2008 15:31:56 +0000 (08:31 -0700) |
Since the newline is not removed from lines before pattern matching, a
pattern cannot match to the end of the line using the '$' operator without
using an additional operator which will indirectly match the '\n' character.
Introduce a test which should pass, but which does not due to this flaw.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pattern cannot match to the end of the line using the '$' operator without
using an additional operator which will indirectly match the '\n' character.
Introduce a test which should pass, but which does not due to this flaw.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4018-diff-funcname.sh | patch | blob | history |
index 72076eca80e4fcf018841ffce4346f17bbb47055..40a805a8661d9a8bcd4802c88d33e8106034a452 100755 (executable)
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
grep "fatal: Last expression must not be negated:"
'
+test_expect_failure 'pattern which matches to end of line' '
+ git config diff.java.funcname "Beer$" &&
+ git diff --no-index Beer.java Beer-correct.java |
+ grep "^@@.*@@ Beer"
+'
+
test_expect_success 'alternation in pattern' '
git config diff.java.xfuncname "^[ ]*((public|static).*)$" &&
git diff --no-index Beer.java Beer-correct.java |