Re: t5562: gzip -k is not portable
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 19, 2018, 18:22 UTC
- Message-ID
- <CAPig+cT2xkR=LbAJLCdeynGkiPysakbVna61cfrtgO3kKh85+g@mail.gmail.com>
- In-Reply-To
- <xmqqk1quvegh.fsf@gitster-ct.c.googlers.com>
On Tue, Jun 19, 2018 at 2:06 PM Junio C Hamano <gitster@pobox.com> wrote:
> Torsten Bögershausen <tboegi@web.de> writes: > > t5562 fails here under MacOS: > > "gzip -k" is not portable.
Very odd. Stock /usr/bin/gzip on my MacOS 10.12.6 _does_ recognize -k, and the test does pass.
> Sigh. Perhaps -c would help. Or do BSD implementations also lack -c?
MacOS and BSD do support -c, so this solution would also work (and is "cleaner" the the other proposal).
Show 10 quoted lines
> diff --git a/t/t5562-http-backend-content-length.sh b/t/t5562-http-backend-content-length.sh > @@ -61,9 +61,9 @@ test_expect_success 'setup' ' > test_expect_success GZIP 'setup, compression related' ' > - gzip -k fetch_body && > + gzip -c fetch_body >fetch_body.gz && > test_copy_bytes 10 <fetch_body.gz >fetch_body.gz.trunc && > - gzip -k push_body && > + gzip -c push_body >push_body.gz && > test_copy_bytes 10 <push_body.gz >push_body.gz.trunc > '