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

Re: Re: [PATCH] t5000, t5003: do not use test_cmp to compare binary files

From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
Date
Jun 4, 2014, 12:59 UTC
Message-ID
<538F1840.7010803@virtuell-zuhause.de>
In-Reply-To
<20140604124257.GA22415@camelia.ucw.cz>
Hi Stephan,
Am 04.06.2014 14:42, schrieb Stepan Kasal:
Show 11 quoted lines
> On Wed, Jun 04, 2014 at 02:13:44PM +0200, Thomas Braun wrote:
>> Wouldn't a function like test_cmp_bin() be better suited for all?
>
> I also considered it.  The advantage is that is shows that
> this intentionally differs from test_cmp.
>
>> The windows folks can then use cmp inside test_cmp_bin() and all others
>
> ... would use cmp as well because it is better suited for the task
> than diff -u.  So test_cmp_bin would be just an alias for cmp, on all
> platforms.  Doesn't that sound weird?

I actually like the idea that the test assertions follow a common naming scheme and can easily be overriden by $arbitrary-crazy-platform.

Using test_cmp_bin instead of cmp would result in then four assertions for comparing arbitrary data test_cmp test_18ncmp test_cmp_text test_cmp_bin where I think the purpose of each function is clear from its name.

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to msysgit@googlegroups.com
To unsubscribe from this group, send email to
msysgit+unsubscribe@googlegroups.com
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "msysGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Previous: Stepan KasalNext: Stepan Kasal
Message 4 of 7 in “t5000, t5003: do not use test_cmp to compare binary files”
  1. t5000, t5003: do not use test_cmp to compare binary filesStepan Kasal, Jun 4, 2014
  2. Thomas BraunJun 4, 2014
  3. Stepan KasalJun 4, 2014
  4. Thomas BraunJun 4, 2014
  5. t5000, t5003: do not use test_cmp to compare binary filesStepan Kasal, Jun 4, 2014
  6. Junio C HamanoJun 4, 2014
  7. Michael GeddesJun 5, 2014

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.