Re: [PATCH v3 1/6] t9001: non order-sensitive file comparison
- From
- Samuel GROOT <samuel.groot@grenoble-inp.org>
- Date
- Jun 8, 2016, 08:23 UTC
- Message-ID
- <f34e3636-ce71-8352-259d-9f723d63e2a8@grenoble-inp.org>
- In-Reply-To
- <xmqqziqwmqth.fsf@gitster.mtv.corp.google.com>
On 06/08/2016 03:07 AM, Junio C Hamano wrote:
Show 9 quoted lines
> I am having a hard time guessing what prompted you to sort the > output, i.e. what problem you were trying to solve. It cannot be > because addresses on a list (e.g. Cc:) could come out in an > indeterministic order, because the address that a test expects to be > the first (cc@example.com in the above example) may not appear as > the first one, but in the textual output it _is_ shown differently > from the remainder (i.e. even if you sort, from "Cc: > cc@example.com," it is clear it was the first one output for Cc: and > diferent from "A <author@example.com>".
Actually we had issues when trying to refactor send-email's email parsing loop [1]. Email addresses in output file `commandeline1` in tests weren't sorted the same way as the reference file it was compared to. E.g.:
!nobody@example.com! !author@example.com! !one@example.com! !two@example.com!
I agree replacing test_cmp with test_cmp_noorder is pointless, I will fix it and re-roll.
Thanks.