[Tests] try to make `nvm unload` test more robust
diff --git "a/test/fast/Running \"nvm unload\" should unset all function and variables." "b/test/fast/Running \"nvm unload\" should unset all function and variables."
index cd5ec6c..516c4f0 100755
--- "a/test/fast/Running \"nvm unload\" should unset all function and variables."
+++ "b/test/fast/Running \"nvm unload\" should unset all function and variables."
@@ -5,11 +5,11 @@
BEFORE="./before.tmp"
AFTER="./after.tmp"
-cleanup () { rm -f "${BEFORE}" "${AFTER}"; }
+cleanup () { echo rm -f "${BEFORE}" "${AFTER}"; }
die () { echo "$@" ; cleanup ; exit 1; }
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${BEFORE}"
-env | grep -v PATH= | grep -v NVM_ >> "${BEFORE}"
+env | grep -v PATH= | grep -v IFS= | grep -v NVM_ | sort >> "${BEFORE}"
set +e # TODO: fix
\. ../../nvm.sh
@@ -20,7 +20,7 @@
nvm unload
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${AFTER}"
-env | grep -v PATH= >> "${AFTER}"
+env | grep -v PATH= | grep -v IFS= | sort >> "${AFTER}"
! type nvm > /dev/null 2>&1 || die "nvm not unloaded"