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

Re: [PATCH] Test suite

From
Junio C Hamano <junkio@cox.net>
Date
May 12, 2005, 19:48 UTC
Message-ID
<7vll6kfcp8.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050512192941.GC324@pasky.ji.cz>
>>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes:
Show 5 quoted lines
>> --- /dev/null
>> +++ b/t/test-lib.sh
>> +# For repeatability, reset the environment to known value.
>> +export LANG C
>> +export TZ UTC
These are just "Duh".  Sorry.
>> +
>> +test_description () {
>> +	while case "$#" in 0) break;; esac
PB> Duh. This looks mysterious - why not a simple test?

Because I am old fashioned and am used to this kind of Bourne shell idioms.

PB> This branch makes no sense, I think.
Because...?
PB> Again, why not a simple test?

Again using case when test is not needed is a good old Bourne shell idiom.

PB> [ "$debug" ] && eval "$*"

PB> (Actually, eval will do the wrong thing here - it just concatenates the PB> arguments. Just "$@" would do, I guess.)

No, I wrote "$*" because that was what I wanted and not "$@". I wanted to give eval a _single_ string.

PB> Please clean up after yourself in this case.

I would not mind, but I'd mildly disagree. The next test will start by cleaning up test-repo/ anyway. What we are lacking is t/Makefile that drives all the tests and clean-up can be done there.

>> +git-init-db 2>/dev/null || error "cannot run git-init-db"
PB> But there's no 'error' thing.

Yes, and that way you can get an error message ;-). Simple oversight.

PB> The testcases currently utterly fail,
That is something I told you in the cover letter (or commit log).
Previous: Petr BaudisNext: Junio C Hamano
Message 13 of 19 in “"git-checkout-cache -f -a" failure”
  1. Morten WelinderMay 9, 2005
  2. Junio C HamanoMay 10, 2005
  3. Morten WelinderMay 10, 2005
  4. Junio C HamanoMay 10, 2005
  5. Petr BaudisMay 10, 2005
  6. Junio C HamanoMay 11, 2005
  7. Morten WelinderMay 11, 2005
  8. Junio C HamanoMay 11, 2005
  9. Junio C HamanoMay 11, 2005
  10. Test suitePetr Baudis, May 11, 2005
  11. Test suiteJunio C Hamano, May 12, 2005
  12. Petr BaudisMay 12, 2005
  13. Junio C HamanoMay 12, 2005
  14. Fix git-diff-files for symlinks.Junio C Hamano, May 12, 2005
  15. 0/3 Core GIT fixes and additions.Junio C Hamano, May 13, 2005
  16. checkout-cache fixJunio C Hamano, May 12, 2005
  17. Petr BaudisMay 12, 2005
  18. Junio C HamanoMay 12, 2005
  19. Junio C HamanoMay 11, 2005

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.