On Tue, Sep 01, 2015 at 06:31:58PM -0400, Jeff King wrote:
> On Tue, Sep 01, 2015 at 10:55:41PM +0100, John Keeping wrote:
> 
> > I considered moving the test_expect_success into the helper, like with
> > test_atom earlier in the file, but it doesn't make the code much more
> > concise and we still need either to setup the output outside the test
> > case or to escape SQ inside SQ.
> 
> Moving it inside also makes it harder to test_expect_failure. :)
> 
> >  test_expect_success 'Check unformatted date fields output' '
> > -   (git for-each-ref --shell --format="%(refname) %(committerdate) 
> > %(authordate)" refs/heads &&
> > -   git for-each-ref --shell --format="%(refname) %(taggerdate)" refs/tags) 
> > >actual &&
> > -   test_cmp expected actual
> > +   test_date "" "Mon Jul 3 17:18:43 2006 +0200" "Mon Jul 3 17:18:44 2006 
> > +0200" "Mon Jul 3 17:18:45 2006 +0200"
> 
> I notice we end up with rather long lines for some of these. Would:
> 
>   test_date "" <<-\EOF
>   Mon Jul 3 17:18:43 2006 +0200
>   Mon Jul 3 17:18:44 2006 +0200
>   Mon Jul 3 17:18:45 2006 +0200
>   EOF
> 
> be more readable?

We could just do:

        test_date "" \
                "Tue Jul 4 01:18:43 2006 +0200" \
                "Tue Jul 4 01:18:44 2006 +0200" \
                "Tue Jul 4 01:18:45 2006 +0200"

I'm not entirely sure why I didn't now that I look at it!
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to