t5703: replace "grep -a" usage by perl
On some platforms likes HP-UX, grep(1) doesn't understand "-a". Let's switch to perl. Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		 Đoàn Trần Công Danh
					Đoàn Trần Công Danh
				
			
				
					committed by
					
						 Junio C Hamano
						Junio C Hamano
					
				
			
			
				
	
			
			
			 Junio C Hamano
						Junio C Hamano
					
				
			
						parent
						
							af6b65d45e
						
					
				
				
					commit
					1eb7371236
				
			| @ -52,15 +52,18 @@ test_expect_success 'setup repository' ' | |||||||
|  |  | ||||||
| test_expect_success 'config controls ref-in-want advertisement' ' | test_expect_success 'config controls ref-in-want advertisement' ' | ||||||
| 	test-tool serve-v2 --advertise-capabilities >out && | 	test-tool serve-v2 --advertise-capabilities >out && | ||||||
| 	! grep -a ref-in-want out && | 	perl -ne "/ref-in-want/ and print" out >out.filter && | ||||||
|  | 	test_must_be_empty out.filter && | ||||||
|  |  | ||||||
| 	git config uploadpack.allowRefInWant false && | 	git config uploadpack.allowRefInWant false && | ||||||
| 	test-tool serve-v2 --advertise-capabilities >out && | 	test-tool serve-v2 --advertise-capabilities >out && | ||||||
| 	! grep -a ref-in-want out && | 	perl -ne "/ref-in-want/ and print" out >out.filter && | ||||||
|  | 	test_must_be_empty out.filter && | ||||||
|  |  | ||||||
| 	git config uploadpack.allowRefInWant true && | 	git config uploadpack.allowRefInWant true && | ||||||
| 	test-tool serve-v2 --advertise-capabilities >out && | 	test-tool serve-v2 --advertise-capabilities >out && | ||||||
| 	grep -a ref-in-want out | 	perl -ne "/ref-in-want/ and print" out >out.filter && | ||||||
|  | 	test_file_not_empty out.filter | ||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'invalid want-ref line' ' | test_expect_success 'invalid want-ref line' ' | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user