[PATCH/RFC 00/10] Re: [PATCH en/cascade-tests] tests: add missing &&

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

>> @@ -36,7 +36,7 @@ test_expect_success 'see what we expect' '
>>  	{
>>  		ln -s x y 2> /dev/null &&
>>  		test -h y 2> /dev/null ||
>> -		no_symlinks=1
>> +		no_symlinks=1 &&
>>  		rm -f y
>
> ... if you allowed such a simple assignment failure, no_symlinks=1 may
> fail, and we end up not running "rm -f y" to clean up, which might be
> somewhat undesirable ;-)

Thanks.  Will undo that bit in my local version.

Actually I don't see why the "rm -f y" is needed in the first place,
but that is a question for another day.

Here's another batch of patches in the same &&-adding vein.  I'm only
sending 10 to the list for now; I can mete the rest out at whatever
rate is useful to people.

Jonathan Nieder (27):
  tests: more missing &&
  test-lib: introduce test_line_count to measure files
  t6022 (renaming merge): chain test commands with &&
  t1502 (rev-parse --parseopt): test exit code from "-h"
  t1400 (update-ref): use test_must_fail
  t3301 (notes): use test_expect_code for clarity
  t3404 (rebase -i): unroll test_commit loops
  t3404 (rebase -i): move comment to description
  t3404 (rebase -i): introduce helper to check position of HEAD
  t4124 (apply --whitespace): use test_might_fail
  t5701 (clone -l): use test_must_fail
  ttt03, t6032: use test_might_fail
  t6032 (merge): give body of rename tests its own function
  t7001 (mv): introduce test_grep function and use it
  t7004 (tag): use test_must_fail
  t9146 (git svn): check exit status from svn in loop
  t9146 (git svn): use test_path_is_dir/missing helpers
  t8007 (textconv): use test_must_fail
  t7502 (commit): use test_must_fail
  t0005 (signals): hide test-sigchain invocation from &&-chaining
    checker
  t0020 (convert): improve error checking in loops
  t0020 (convert): use diff-index --exit-code
  t0020 (convert): remove "Huh?" noise
  t0040 (parse-options): use test_expect_code
  t7300 (clean): use test_cmp instead of test "$foo" = bar
  t1501 (rev-parse): use sane_unset
  t4022 (diff -B): simplify using test_grep

 t/README                      |    9 ++
 t/t0005-signals.sh            |   16 ++-
 t/t0020-crlf.sh               |  247 +++++++++---------------------------
 t/t0040-parse-options.sh      |   12 +-
 t/t1400-update-ref.sh         |   25 ++--
 t/t1501-worktree.sh           |    4 +-
 t/t1502-rev-parse-parseopt.sh |    2 +-
 t/t3301-notes.sh              |    8 +-
 t/t3404-rebase-interactive.sh |   88 ++++++-------
 t/t4022-diff-rewrite.sh       |    9 +-
 t/t4124-apply-ws-rule.sh      |   11 +-
 t/t5503-tagfollow.sh          |   10 +-
 t/t5701-clone-local.sh        |   22 +---
 t/t6022-merge-rename.sh       |  282 +++++++++++++---------------------------
 t/t6032-merge-large-rename.sh |   36 ++++--
 t/t7001-mv.sh                 |    8 +-
 t/t7004-tag.sh                |   36 +++---
 t/t7300-clean.sh              |   25 ++--
 t/t7502-commit.sh             |    4 +-
 t/t7700-repack.sh             |    6 +-
 t/t8007-cat-file-textconv.sh  |    2 +-
 t/t9146-git-svn-empty-dirs.sh |   64 ++++------
 t/test-lib.sh                 |   57 ++++++++
 23 files changed, 395 insertions(+), 588 deletions(-)

-- 
1.7.2.3.557.gab647.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]