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>
This commit is contained in:
		
				
					committed by
					
						
						Junio C Hamano
					
				
			
			
				
	
			
			
			
						parent
						
							a67e281162
						
					
				
				
					commit
					cd83ac4156
				
			@ -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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user