From 4c7d899447a18d3d06db0c98737460e117d22419 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 26 Jul 2024 12:04:07 -0700 Subject: [PATCH] [Tests] ignore travis-ci env vars; improve debug output --- ...ing 'nvm unload' should unset all function and variables | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 e7fb706..abb5ca4 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 @@ -9,7 +9,7 @@ cleanup () { rm -f "${BEFORE}" "${AFTER}"; } die () { echo "$@" ; cleanup ; exit 1; } typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${BEFORE}" -env | grep -v PATH= | grep -v IFS= | grep -v NVM_ | sort >> "${BEFORE}" +env | grep -v PATH= | grep -v IFS= | grep -v NVM_ | grep -v TRAVIS_ | sort >> "${BEFORE}" set +e # TODO: fix \. ../../nvm.sh @@ -20,11 +20,11 @@ type nvm > /dev/null 2>&1 || die "nvm not loaded" nvm unload typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${AFTER}" -env | grep -v PATH= | grep -v IFS= | sort >> "${AFTER}" +env | grep -v PATH= | grep -v IFS= | grep -v TRAVIS_ | sort >> "${AFTER}" ! type nvm > /dev/null 2>&1 || die "nvm not unloaded" DIFF="$(diff "${BEFORE}" "${AFTER}" ||:)" -[ -z "${DIFF}" ] || die "function pollution found: ${DIFF}" +[ -z "${DIFF}" ] || die "function pollution found: >${DIFF}<" cleanup