Re: [PATCHv4 14/15] Add missing &&'s throughout the testsuite
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:49:39
Elijah Newren [off-list ref] writes:
quoted hunk
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index de38c7f..ddd1c23 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh@@ -19,24 +19,23 @@ attr_check () { test_expect_success 'setup' ' mkdir -p a/b/d a/c && - ( - echo "[attr]notest !test" - echo "f test=f" - echo "a/i test=a/i" - echo "onoff test -test" - echo "offon -test test" - echo "no notest" - ) >.gitattributes && - ( - echo "g test=a/g" && - echo "b/g test=a/b/g" - ) >a/.gitattributes && - ( - echo "h test=a/b/h" && - echo "d/* test=a/b/d/*" - echo "d/yes notest" - ) >a/b/.gitattributes - + cat <<EOF >.gitattributes &&
If you are not doing any variable substitution in the here document, please quote EOF to make it clear, i.e. cat >.gitattributes <<\EOF &&
quoted hunk
@@ -73,7 +72,7 @@ offon: test: set no: test: unspecified a/b/d/no: test: a/b/d/* a/b/d/yes: test: unspecified -EOF +EOF &&
Huh? Cascading && (or ||) goes on the first line of <<HERE document, as you wrote yourself in the above ;-)
quoted hunk
diff --git a/t/t4119-apply-config.sh b/t/t4119-apply-config.sh index 3c73a78..3d0384d 100755 --- a/t/t4119-apply-config.sh +++ b/t/t4119-apply-config.sh@@ -73,7 +73,7 @@ D=`pwd` test_expect_success 'apply --whitespace=strip in subdir' ' cd "$D" && - git config --unset-all apply.whitespace + git config --unset-all apply.whitespace &&
At this point, do we know that the previous test that added apply.whitespace to $D's configuration has successfully run and left the variable, or do we need to say this might-fail?
quoted hunk
diff --git a/t/t8003-blame.sh b/t/t8003-blame.sh index 230143c..ddabf4f 100755 --- a/t/t8003-blame.sh +++ b/t/t8003-blame.sh@@ -153,15 +153,15 @@ test_expect_success 'blame path that used to be a directory' ' ' test_expect_success 'blame to a commit with no author name' ' - TREE=`git rev-parse HEAD:` + TREE=`git rev-parse HEAD:` && cat >badcommit <<EOF tree $TREE author <noname> 1234567890 +0000 committer David Reiss <dreiss@facebook.com> 1234567890 +0000 some message -EOF - COMMIT=`git hash-object -t commit -w badcommit` +EOF &&
Huh, again?