Re: [PATCH] test-lib: stricter unzip(1) check
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 18, 2016, 20:19 UTC
- Message-ID
- <xmqqk2giitrn.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20160718200351.GA61232@plume>
Eric Wong <e@80x24.org> writes:
Show 12 quoted lines
> Junio C Hamano <gitster@pobox.com> wrote: >> +test_lazy_prereq UNZIP_AUTOTEXT ' >> + ( >> + mkdir unzip-autotext && >> + cd unzip-autotext >> + "$GIT_UNZIP" -a "$TEST_DIRECTORY"/t5003/infozip-text.zip && >> + test -f text >> + ) > > /usr/bin/unzip actually takes -a on FreeBSD, just not in the > same way the Info-ZIP version does, so I suspect "test -f" > here is not enough.
Hmph. So it only and always does "CRLF -> LF", while Info-ZIP version does something like autocrlf?
Show 6 quoted lines
> I would test this, but I can't apply it: > >> diff --git a/t/t5003/infozip-text.zip b/t/t5003/infozip-text.zip >> new file mode 100644 >> index 0000000..a019acb >> Binary files /dev/null and b/t/t5003/infozip-text.zip differ
Heh. It was created like so:
$ printf 'text\r\n' >text && zip -ll infozip-text.zip text
$ zipinfo infozip-text.zip text
-rw-r----- 3.0 unx 5 tx stor 16-Jul-18 13:12 textt/t5003/infozip-text.zip | Bin 0 -> 163 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/t/t5003/infozip-text.zip b/t/t5003/infozip-text.zip new file mode 100644 index 0000000000000000000000000000000000000000..7119bbb62699f4cb613f3675f57aa9c9dc021ea0 GIT binary patch literal 163 zcmWIWW@h1H0D&2qpFGrWy)kD6vO$=IL586uwW1_6gp+~U-l8`ggi9;985mjSu4iOm z=@4cB%X0;IGcw6B<1$17WHtjM5HDy1u^>jWLX1Q+F2I|W4Wxz<2)%%`Gl;_g0G&b| AeE<Le literal 0 HcmV?d00001