diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-01-04 19:34:14 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-06 18:28:11 -0800 |
commit | cd83ac4156a211e019b47fa58de0784cee547ddf (patch) | |
tree | 6124e79b0001ee9a07f2876d19a840b2dada08ab /t | |
parent | a67e28116287ea84b162b22a5b69ec02ebd34023 (diff) | |
download | git-cd83ac4156a211e019b47fa58de0784cee547ddf.tar.gz git-cd83ac4156a211e019b47fa58de0784cee547ddf.tar.xz |
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 <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7002-grep.sh | 12 |
1 files changed, 12 insertions, 0 deletions
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 <<EOF #include <stdio.h> int main(int argc, const char **argv) |