git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 2/2] t1006: ensure cat-file info isn't buffered by default

From
EWEric Wong <e@80x24.org>
Date
Jun 19, 2024, 17:56 UTC
Message-ID
<20240619175633.M826655@dcvr>
In-Reply-To
<xmqqzfrhyg8j.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Eric Wong <e@80x24.org> writes:
> 
> >> Yes, using Perl is a good substitute for writing it in C in this
> >> case.  I however question the choice to use t9700/test.pl here,
> >> which is clearly stated that its purpose is to "test perl interface
> >> which is Git.pm", and added tests are not testing anything in Git.pm
> >> at all.
> >> 
> >> Using t9700/test.pl only because it happens to use "perl -MTest::More"
> >> sounds a bit eh, suboptimal.
> >
> > *shrug*  I figure Test::More is common enough since it's part of
> > the Perl standard library; but I consider Perl a better scripting
> > language than sh by far and wish our whole test suite were Perl :>
> 
> Oh, I think we (actually the author of t9700) considers it common
> enough that we have PERL_TEST_MORE prerequisite to allow us to write
> tests, assuming that it is available, and let us easily skip where
> it is not available.  So I do not think I mind the dependency on
> Test::More at all.  Moving the tests to t1006 and rewriting the
> tests not to use Test::More are two separate and unrelated things,
> and if you are more comfortable with Test::More (and more
> importantly if it is natural to write Perl based tests using
> Test::More), it is not necessary to switch away from it.

OK, fair enough. Given t1006 is mostly sh, I prefer keeping v2 as-is because the Test::More->builder munging of test numbers in t9700/test.pl is nasty too and I wouldn't enjoy duplicating those bits in a hypothetical t1006/test.pl, either.

It would be nice to have first class support for Test::More in our suite so we could just have t/t0006-cat-file.t and t/t9700-perl-git.t implemented in Perl without sh at all, but that's a separate discussion.

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 16 in “cat-file related doc and test”
  1. 0/2 cat-file related doc and testEric Wong, Jun 17, 2024
  2. 1/2 Git.pm: use array in command_bidi_pipe exampleEric Wong, Jun 17, 2024
  3. Junio C HamanoJun 17, 2024
  4. 2/2 t9700: ensure cat-file info isn't buffered by defaultEric Wong, Jun 17, 2024
  5. Junio C HamanoJun 17, 2024
  6. 2/2 t1006: ensure cat-file info isn't buffered by defaultEric Wong, Jun 18, 2024
  7. Junio C HamanoJun 18, 2024
  8. Eric WongJun 19, 2024
  9. Junio C HamanoJun 20, 2024
  10. Jeff KingJun 21, 2024
  11. Eric WongJun 21, 2024
  12. Jeff KingJun 24, 2024
  13. Junio C HamanoJun 17, 2024
  14. Phillip WoodJun 19, 2024
  15. Eric WongJun 19, 2024
  16. Phillip WoodJun 21, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.