From: Nguyễn Thái Ngọc Duy Date: Mon, 4 Jan 2010 12:34:14 +0000 (+0700) Subject: t7002: set test prerequisite "external-grep" if supported X-Git-Tag: v1.7.0-rc0~103^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cd83ac4156a211e019b47fa58de0784cee547ddf;p=git.git t7002: set test prerequisite "external-grep" if supported 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t7002-grep.sh b/t/t7002-grep.sh index b4709e28b..23eeb767f 100755 --- a/t/t7002-grep.sh +++ b/t/t7002-grep.sh @@ -8,6 +8,18 @@ test_description='git grep various. . ./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 < int main(int argc, const char **argv)