Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

Re: [PATCH v2] pretty: Provide a strict ISO8601 date format

From: Jeff King <hidden>
Date: 2016-06-15 23:02:24

On Fri, Aug 29, 2014 at 11:02:36PM +0200, Beat Bolli wrote:
On 29.08.14 20:59, Junio C Hamano wrote:
quoted
quoted
+# 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=%aI%n%cI >actual &&
+	test_cmp expected actual
+'
This is saying that as long as --date=iso-strict format is
bug-to-bug compatible with --date=iso format it is OK.

Which is fine, especially knowing the implementation ;-)
Yeah, I wasn't sure how to test this, since the commit dates change with
each test run. Maybe it's the easy way out, but on the other hand it's
better than no test at all. Check the known parts with a regex?
If you use test_tick (or test_commit, which calls it), the timestamps
are stable from run to run of the tests.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help