From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Eric Wong" <e@80x24.org>, "René Scharfe" <l.s.r@web.de>,
git@vger.kernel.org,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] test-lib: stricter unzip(1) check
Date: Mon, 18 Jul 2016 17:41:21 -0600 [thread overview]
Message-ID: <20160718234121.GA26152@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqshv6ivfk.fsf@gitster.mtv.corp.google.com>
On Mon, Jul 18, 2016 at 12:43:27PM -0700, Junio C Hamano wrote:
> -- >8 --
> test: check "unzip" and "unzip -a"
>
> Different platforms have implementations "unzip" that behave
> differently. Most of the tests we use GIT_UNZIP we only care about
> the command to be able to extract from *.zip archive, but one test
> in t5003 wants it to also be able to grok the "-a" option.
>
> Prepare a sample zip file that has a single text file in it, and try
> extracting its contents to see GIT_UNZIP is usable. when setting
> UNZIP prerequisite. Similarly, set UNZIP_AUTOTEXT prerequisite by
> running GIT_UNZIP with the "-a" option.
I like the direction here, modulo the problems with "-a" that Eric
pointed out. Maybe "zip -l" would be a better approach.
One nit:
> +test_lazy_prereq UNZIP_AUTOTEXT '
> + (
> + mkdir unzip-autotext &&
> + cd unzip-autotext
> + "$GIT_UNZIP" -a "$TEST_DIRECTORY"/t5003/infozip-text.zip &&
> + test -f text
> + )
> +'
I don't think we need the extra directory or the subshell here.
test_lazy_prereq takes care of that for us.
> 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
Couldn't apply this locally without --binary, of course. :)
-Peff
prev parent reply other threads:[~2016-07-18 23:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 6:44 [PATCH] test-lib: stricter unzip(1) check Eric Wong
2016-07-18 13:04 ` Jeff King
2016-07-18 13:52 ` Johannes Schindelin
2016-07-18 18:20 ` Junio C Hamano
2016-07-18 18:56 ` Jeff King
2016-07-18 19:17 ` Junio C Hamano
2016-07-19 11:27 ` Johannes Schindelin
2016-07-19 17:26 ` Junio C Hamano
2016-07-18 19:43 ` Junio C Hamano
2016-07-18 20:03 ` Eric Wong
2016-07-18 20:19 ` Junio C Hamano
2016-07-18 21:19 ` Eric Wong
2016-07-18 21:27 ` Junio C Hamano
2016-07-18 23:41 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160718234121.GA26152@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).