summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a67e281)
raw | patch | inline | side by side (parent: a67e281)
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Mon, 4 Jan 2010 12:34:14 +0000 (19:34 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 7 Jan 2010 02:28:11 +0000 (18:28 -0800) |
Add another test to set prerequisite EXTGREP if the current build supports
external grep. This can be used to skip external grep only tests on builds
that do not support this optimization.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
external grep. This can be used to skip external grep only tests on builds
that do not support this optimization.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7002-grep.sh | patch | blob | history |
diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh
index b4709e28b5107cfad95290a78ac0260df0485213..23eeb767f97d9640c44e48d396d1b76afb0fa5b9 100755 (executable)
--- a/t/t7002-grep.sh
+++ b/t/t7002-grep.sh
. ./test-lib.sh
+test_expect_success 'Check for external grep support' '
+ case "$(git grep -h 2>&1|grep ext-grep)" in
+ *"(default)"*)
+ test_set_prereq EXTGREP
+ true;;
+ *"(ignored by this build)"*)
+ true;;
+ *)
+ false;;
+ esac
+'
+
cat >hello.c <<EOF
#include <stdio.h>
int main(int argc, const char **argv)