From 14487be67a4d2e7cfcbda928c998e83a0bdbae96 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 6 Jul 2012 20:49:15 +0200 Subject: [PATCH] tests: don't clutter the top-level dir with temporary test directories * 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 --- t/self-check-me.tap | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/t/self-check-me.tap b/t/self-check-me.tap index 717fe2e37..e89e15085 100755 --- a/t/self-check-me.tap +++ b/t/self-check-me.tap @@ -31,7 +31,11 @@ set +e 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 } @@ -47,7 +51,12 @@ do_check abc. 'abc\.' # 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 -- 2.47.2