On Fri, Aug 28, 2015 at 11:57 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Junio C Hamano <gitster@xxxxxxxxx> writes: >> Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes: >>> On Sun, Aug 23, 2015 at 5:29 AM, "René Scharfe" <l.s.r@xxxxxx> wrote: >>>> I suspected that zipinfo's output might be formatted differently on >>>> different platforms and tried to guard against it by checking for the >>>> number zero there. Git's ZIP file creation is platform independent >>>> (modulo bugs), so having a test run at least somewhere should >>>> suffice. In theory. >>>> >>>> We could add support for the one-line-summary variant on OS X easily, >>>> though. >>> >>> Probably, although it's looking like testing on Mac OS X won't be >>> fruitful (see below). >> >> Can we move this topic forward by introducing a new prerequisite >> ZIPINFO and used at the beginning of these tests (make it a lazy >> prereq)? Run zipinfo on a trivial archive and see if its output is >> something we recognize to decide if the platform supports that >> ZIPINFO prerequisite and do this test only on them. > > Heh, that is exactly what the patch under discussion does. So... > >> After all, what _is_ being tested, i.e. our archive creation, would >> not change across platforms, so having a test that runs on a known >> subset of platforms is better than not having anything at all. > > ...I'd say we can take this patch as-is, and those who want to have > a working test on MacOS can come up with an enhancement to the way > the script parses output from zipinfo that would also work on their > platforms. Right, the new test is correctly skipped on Mac OS X and FreeBSD, so the patch is suitable as-is. We might, however, want to augment the commit message with some of the knowledge learned from this thread. Perhaps modify the last sentence of the second paragraph and then insert additional information following it, like this? ... at least provides *some* way to check this field, although presently only on Linux. zipinfo on current Mac OS X (Yosemite 10.10.5) does not support this field, and, when encountered, caps the printed file count at 65535 (and spits out warnings and errors), thus is not useful for testing. (Its output also differs from zipinfo on Linux, thus requires changes to the 'sed' recognition and extraction expressions, but that's a minor issue.) zipinfo on FreeBSD seems to have been retired altogether in favor of "unzip -Z", however, only in the emasculated form "unzip -Z -1" which lists archive entries but does not provide a file count, thus is not useful for this test. (I also snuck a s/can// fix in there for the last sentence of the second paragraph.) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html