tests: only activate 'unset' alias if required
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 21 May 2013 09:59:21 +0000 (11:59 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 21 May 2013 22:05:19 +0000 (00:05 +0200)
commita422365b7cbd5cdaa8e3f36e14d5480c22f8cb6f
treef21a93f329545248743ea1d7f561f6060b531a4b
parentffd4ecc946c6b150f5ee5684fa04bd4f9e8b7af9
tests: only activate 'unset' alias if required

This makes the test logs easier to read for most shells (which do not
actually require that alias).  This is especially important now that
'unset' is used in the new 'run_make()' function, and that function is
likely going to be used more and more in the future.

* t/ax/test-lib.sh (_am_unset, unset): Only define this function and
alias if "unset VAR" returns a non-zero exit status when VAR is already
unset.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/ax/test-lib.sh