tests: simplify sourcing of helper shell files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 25 Jul 2012 22:20:03 +0000 (00:20 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 12:11:33 +0000 (14:11 +0200)
commit42fb45b7d98e9155d05f056609452f0ff2385333
treeb079515441f6003ab019e5f4adf9227106c1d8dd
parentecbceb3e4cb88019e490c4814ca7a7382e4e2299
tests: simplify sourcing of helper shell files

Now that the early $PATH setup in both 'runtest' and AM_TESTS_ENVIRONMENT
allow the '.' built-in to find to-be-sourced shell scripts in the 't/ax/'
directory automatically, we can simplify several usages like:

   . "$am_testauxdir"/foo.sh

to just:

   . foo.sh

Also, because our test scripts run with the 'errexit' flag active, and
because POSIX mandates that, when the '.' built-in is used,

   ... if no readable file is found, a non-interactive shell shall abort ...

we can further simplify usages like:

    . "$am_testauxdir"/foo.sh || fatal_ "sourcing foo.sh"

once again to to just:

    . foo.sh

* ./defs, several tests: Adjusted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
74 files changed:
defs
t/tap-ambiguous-directive.sh
t/tap-autonumber.sh
t/tap-bailout-and-logging.sh
t/tap-bailout-leading-space.sh
t/tap-bailout-suppress-badexit.sh
t/tap-bailout-suppress-later-diagnostic.sh
t/tap-bailout-suppress-later-errors.sh
t/tap-bailout.sh
t/tap-color.sh
t/tap-deps.sh
t/tap-diagnostic.sh
t/tap-empty-diagnostic.sh
t/tap-empty.sh
t/tap-escape-directive-2.sh
t/tap-escape-directive.sh
t/tap-exit.sh
t/tap-fancy.sh
t/tap-fancy2.sh
t/tap-global-log.sh
t/tap-global-result.sh
t/tap-log.sh
t/tap-merge-stdout-stderr.sh
t/tap-missing-plan-and-bad-exit.sh
t/tap-msg0-bailout.sh
t/tap-msg0-directive.sh
t/tap-msg0-misc.sh
t/tap-msg0-planskip.sh
t/tap-msg0-result.sh
t/tap-negative-numbers.sh
t/tap-no-disable-hard-error.sh
t/tap-no-merge-stdout-stderr.sh
t/tap-no-spurious-numbers.sh
t/tap-no-spurious-summary.sh
t/tap-no-spurious.sh
t/tap-not-ok-skip.sh
t/tap-number-wordboundary.sh
t/tap-numbers-leading-zero.sh
t/tap-numeric-description.sh
t/tap-out-of-order.sh
t/tap-passthrough-exit.sh
t/tap-passthrough.sh
t/tap-plan-corner.sh
t/tap-plan-errors.sh
t/tap-plan-leading-zero.sh
t/tap-plan-malformed.sh
t/tap-plan-middle.sh
t/tap-plan-whitespace.sh
t/tap-plan.sh
t/tap-planskip-and-logging.sh
t/tap-planskip-badexit.sh
t/tap-planskip-bailout.sh
t/tap-planskip-case-insensitive.sh
t/tap-planskip-late.sh
t/tap-planskip-later-errors.sh
t/tap-planskip-unplanned-corner.sh
t/tap-planskip-unplanned.sh
t/tap-planskip-whitespace.sh
t/tap-planskip.sh
t/tap-realtime.sh
t/tap-recheck-logs.sh
t/tap-result-comment.sh
t/tap-summary-color.sh
t/tap-summary.sh
t/tap-test-number-0.sh
t/tap-todo-skip-together.sh
t/tap-todo-skip-whitespace.sh
t/tap-todo-skip.sh
t/tap-unplanned.sh
t/tap-whitespace-normalization.sh
t/tap-with-and-without-number.sh
t/tap-xfail-tests.sh
t/testsuite-summary-color.sh
t/testsuite-summary-count.sh