On Sat, Aug 29, 2009 at 23:46, Junio C Hamano[off-list ref] wrote:
Alex Riesen [off-list ref] writes:
quoted
To complement the testability of approxidate.
---
Alex Riesen, Fri, Aug 28, 2009 21:33:02 +0200:
quoted
It should allow safe testing of this part of the code.
And this should really allow testing of it:
$ ./test-date '10.days.ago'
10.days.ago -> bad -> Thu Jan 1 01:00:00 1970
10.days.ago -> Tue Aug 18 22:50:20 2009
relative: 10.days.ago -> Fri Dec 22 12:00:00 1989
relative: 10 days ago, out of Fri Dec 22 12:00:00 1989
$
What are these blank lines for?
ctime(3) artifact (it adds a \n in the output buffer), which I missed.
Is this intended as a serious submission for inclusion?
Not yet. AFAICS, test-date is never used in our test suite.
I am having a hrad time to guess, especially you did not
sign this off, nor Cc'ed me.
Right, that's because I'm not sure myself. Frankly, I'm not
convinced we have to test every single thing. In my experience,
the bigger a test suite, the less are people inclined to use it
(including setting up automatic test runs).
Jeff, Nicolas? Is this test enough? Are there any other code
paths you want to include in the test?
And sorry for having you missed in Cc:, that wasn't intended.