t3040 (subprojects-basic): fix '&&' chaining, modernize style
commit5e1136227178f2ca48c472a4cc89ccfc92328965
authorRamkumar Ramachandra <artagnon@gmail.com>
Fri, 9 Dec 2011 11:29:13 +0000 (9 16:59 +0530)
committerJunio C Hamano <gitster@pobox.com>
Fri, 9 Dec 2011 19:30:42 +0000 (9 11:30 -0800)
tree6bcf434de2c978a7cd0f2931e1049f344db4252b
parent7f9a5fc6876a3158cb29b0c2d13ccb226ec7d679
t3040 (subprojects-basic): fix '&&' chaining, modernize style

Breaks in a test assertion's && chain can potentially hide failures
from earlier commands in the chain.  Fix instances of this.  While at
it, clean up the style to fit the prevailing style.  This means:

- Put the opening quote starting each test on the same line as the
  test_expect_* invocation.

- Indent the file with tabs, not spaces.

- Use test_expect_code() in preference to checking the exit status of
  various statements by hand.

- Guard commands that prepare test input for individual tests in the
  same test_expect_success, so that their scope is clearer and errors
  at that stage can be caught.

- Use <<-\EOF in preference to <<EOF to save readers the trouble of
  looking for variable interpolations.

- Include "setup" in the titles of test assertions that prepare for
  later ones to make it more obvious which tests can be skipped.

Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3040-subprojects-basic.sh