From: Jakub Narebski <jnareb@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t3000 (ls-files -o): modernize style
Date: Sun, 11 Jul 2010 01:33:33 -0700 (PDT) [thread overview]
Message-ID: <m3d3uul8pd.fsf@localhost.localdomain> (raw)
In-Reply-To: <20100711042025.GA7424@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
> This script is part of the second batch of tests, from the same day
> the test infrastructure was added to git. Update it to use a more
> modern style in the spirit of v1.6.4-rc0~45^2~2 (2009-05-22).
> In particular:
>
> - Put setup code inside test assertions, to avoid unexpected
> breakages and avoid stray output without -v (as t/README
> recommends); and
O.K., but...
> -cat >expected1 <<EOF
> -expected1
> -expected2
> -expected3
> -output
> -path0
> -path1
> -path2-junk
> -path2/file2
> -EOF
> -sed -e 's|path2/file2|path2/|' <expected1 >expected2
> -cat <expected2 >expected3
> -echo path4/ >>expected2
> -
> +test_expect_success 'setup: expected output' '
> + cat >expected1 <<-\EOF &&
> + expected1
> + expected2
> + expected3
> + output
> + path0
> + path1
> + path2-junk
> + path2/file2
> + EOF
> +
> + sed -e "s|path2/file2|path2/|" <expected1 >expected2 &&
> + cp expected2 expected3 &&
> + echo path4/ >>expected2
> +'
... I don't think it is really needed. There isn't anything there
that can fail, and there isn't anything there that produces any
output.
BTW. do all sane shells that can be used to run test suite support
'<<-' here-doc redirection operators? Is it in POSIX?
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2010-07-11 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-11 4:20 [PATCH] t3000 (ls-files -o): modernize style Jonathan Nieder
2010-07-11 8:33 ` Jakub Narebski [this message]
2010-07-11 9:10 ` Ævar Arnfjörð Bjarmason
2010-07-11 15:14 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d3uul8pd.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).