From: Ævar Arnfjörð Bjarmason Date: Mon, 30 Aug 2010 10:22:50 GMT Subject: Re: [PATCH] tests: factor HOME=$(pwd) in test-lib.sh Message-ID: In-Reply-To: <1283161842-22689-1-git-send-email-Matthieu.Moy@imag.fr> On Mon, Aug 30, 2010 at 09:50, Matthieu Moy wrote: > The same pattern is used in many tests, and makes it easy for new ones to > rely on $HOME being a trashable, clean, directory. Looks good, but why not: > +HOME=$(pwd) > +export HOME This instead: HOME=$TRASH_DIRECTORY export HOME Looks like it might be more correct given this (always an absolute path), but I haven't tested: case "$test" in /*) TRASH_DIRECTORY="$test" ;; *) TRASH_DIRECTORY="$TEST_DIRECTORY/$test" ;; esac