* t/self-check-me.tap: Be sure to initialize '$am_create_testdir' to "no"
in all the shell invocations sourcing './defs'. Otherwise, when running
the testsuite with 'keep_testdirs=yes', the following temporary director
are left cluttering the top-level directory:
./012.dir
./abc..dir
./a.b.c.dir
./foo.dir
./foo.bar.dir
./foo-bar-.dir
./_foo__bar.dir
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
do_check ()
{
- $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' "$1" | grep "^me=$2$"
+ $AM_TEST_RUNNER_SHELL -c '
+ am_create_testdir=no # Do not pollute the top-level directory.
+ . ./defs
+ echo me=$me
+ ' "$1" | grep "^me=$2$"
command_ok_ "me=$1" test $? -eq 0
}
# A definition of $me in the environment should be ignored.
-s=$(me=bad $AM_TEST_RUNNER_SHELL -c '. ./defs && echo me=$me' foo.sh)
+s=$(me=bad $AM_TEST_RUNNER_SHELL -c '
+ # Do not pollute the top-level directory.
+ am_create_testdir=no
+ . ./defs
+ echo me=$me
+' foo.sh)
command_ok_ "override of \$me before ./defs causes no error" \
test $? -eq 0