@matheusbsbs / matheus-bagliano / commits / 1eb7371236
Fork 0

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>

Đoàn Trần Công Danh committed May 19, 2020 at 07:50 UTC 1eb73712360744b552f30a6961c03d05bc44bef2
1 file changed +6 -3
t/t5703-upload-pack-ref-in-want.sh
+6 -3
@@ -52,15 +52,18 @@ test_expect_success 'setup repository' '
52
53 test_expect_success 'config controls ref-in-want advertisement' '
54 test-tool serve-v2 --advertise-capabilities >out &&
55 - ! grep -a ref-in-want out &&
55 + perl -ne "/ref-in-want/ and print" out >out.filter &&
56 + test_must_be_empty out.filter &&
57
58 git config uploadpack.allowRefInWant false &&
59 test-tool serve-v2 --advertise-capabilities >out &&
59 - ! grep -a ref-in-want out &&
60 + perl -ne "/ref-in-want/ and print" out >out.filter &&
61 + test_must_be_empty out.filter &&
62
63 git config uploadpack.allowRefInWant true &&
64 test-tool serve-v2 --advertise-capabilities >out &&
63 - grep -a ref-in-want out
65 + perl -ne "/ref-in-want/ and print" out >out.filter &&
66 + test_file_not_empty out.filter
67 '
68
69 test_expect_success 'invalid want-ref line' '