@matheusbsbs / matheus-bagliano / commits / cd83ac4156
Fork 0

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>

Nguyễn Thái Ngọc Duy committed Jan 4, 2010 at 19:34 UTC cd83ac4156a211e019b47fa58de0784cee547ddf
1 file changed +12
t/t7002-grep.sh
+12
@@ -8,6 +8,18 @@ test_description='git grep various.
8
9 . ./test-lib.sh
10
11 +test_expect_success 'Check for external grep support' '
12 + case "$(git grep -h 2>&1|grep ext-grep)" in
13 + *"(default)"*)
14 + test_set_prereq EXTGREP
15 + true;;
16 + *"(ignored by this build)"*)
17 + true;;
18 + *)
19 + false;;
20 + esac
21 +'
22 +
23 cat >hello.c <<EOF
24 #include <stdio.h>
25 int main(int argc, const char **argv)