Re: [PATCH 1/2] pretty tests: simplify %aI/%cI date format test
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 27, 2021, 07:08 UTC
- Message-ID
- <xmqqtunsdx1f.fsf@gitster.g>
- In-Reply-To
- <patch-1.2-4a90e4a141a-20210425T090506Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 6 quoted lines
> # ISO strict date format > test_expect_success 'ISO and ISO-strict date formats display the same values' ' > - git log --format=%ai%n%ci | > - sed -e "s/ /T/; s/ //; s/..\$/:&/" >expected && > + git log --format=%ad%n%cd --date=iso-strict >expected && > git log --format=%aI%n%cI >actual &&
While these two must show the same output, I wonder how much value we are getting out of them. Don't they end up exercising pretty much the same codepath?
Not that I think the original is any better at all, though ;-)
> test_cmp expected actual > '