summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d0042ab)
raw | patch | inline | side by side (parent: d0042ab)
author | Junio C Hamano <gitster@pobox.com> | |
Mon, 20 Jun 2011 21:49:34 +0000 (14:49 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 20 Jun 2011 21:49:34 +0000 (14:49 -0700) |
Michael J Gruber noticed that under /bin/dash this test failed
(as is expected -- \n in the string can be interpreted by the
command), while it passed with bash. We probably could work it
around by using backquote in front of it, but it is safer and
more readable to avoid "echo" altogether in a case like this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
(as is expected -- \n in the string can be interpreted by the
command), while it passed with bash. We probably could work it
around by using backquote in front of it, but it is safer and
more readable to avoid "echo" altogether in a case like this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7810-grep.sh | patch | blob | history |
diff --git a/t/t7810-grep.sh b/t/t7810-grep.sh
index 69bd576d1c1a0bfcd086b68d8dc07c03c22b7a5a..6379ad60bcb9b5b56eb773b5a987745356c24df6 100755 (executable)
--- a/t/t7810-grep.sh
+++ b/t/t7810-grep.sh
'
test_expect_success LIBPCRE 'grep -P -i pattern' '
- {
- echo "hello.c: printf(\"Hello world.\n\");"
- } >expected &&
+ cat >expected <<-EOF &&
+ hello.c: printf("Hello world.\n");
+ EOF
git grep -P -i "PRINTF\([^\d]+\)" hello.c >actual &&
test_cmp expected actual
'