Re: [PATCH] t5703: replace "grep -a" usage by perl
- From
- Darren Tucker <dtucker@dtucker.net>
- Date
- May 19, 2020, 02:22 UTC
- Message-ID
- <CALDDTe1k7Fsb9p+4TEd3GSG_bOucrxSKmENsjACwga8L7LvLXg@mail.gmail.com>
- In-Reply-To
- <20200519005645.GD1999@danh.dev>
On Tue, 19 May 2020 at 10:56, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
Show 11 quoted lines
> On 2020-05-19 09:22:01+1000, Darren Tucker <dtucker@dtucker.net> wrote: > > On Tue, 19 May 2020 at 01:30, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote: > > [...] > > > > printf: \3: invalid escape > > > > > > Look like HP-UX's printf doesn't understand octal escape. > > > > The HP-UX one is actually OK with that. The error is from an old gnu > > coreutils (2.0), and it's complaining because there no leading zero, > > which POSIX says octal escapes have: > > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
I've replaced the printf in question. You could add leading zeroes in case anything else strictly conforms to POSIX but it looks like there's quite a lot of them.
> I think it's better to use HP-UX native tools for the test. > Can you check with this patch applied on top of your tree.
[...]
> On some platforms likes HP-UX, grep(1) doesn't understand "-a".
nit: "like HP-UX"
Yep that works:
$ PATH=/usr/local/bin:$PATH ./t5703-upload-pack-ref-in-want.sh ok 1 - setup repository ok 2 - config controls ref-in-want advertisement ok 3 - invalid want-ref line ok 4 - basic want-ref ok 5 - multiple want-ref lines ok 6 - mix want and want-ref ok 7 - want-ref with ref we already have commit for ok 8 - setup repos for fetching with ref-in-want tests ok 9 - fetching with exact OID ok 10 - fetching multiple refs ok 11 - fetching ref and exact OID ok 12 - fetching with wildcard that does not match any refs ok 13 - fetching with wildcard that matches multiple refs # passed all 13 test(s) # SKIP skipping test, git built without http support 1..13
Thanks.
--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.