Skip to content
Myr

[Tests] ignore travis-ci env vars; improve debug output

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 80cb39d · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • tests:+3 added−3 removed

1 file+3 added−3 removed

modified:test/fast/Running 'nvm unload' should unset all function and variables+3 added-3 removed
7 unmodified lines
8cleanup () { rm -f "${BEFORE}" "${AFTER}"; }9die () { echo "$@" ; cleanup ; exit 1; }1011typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${BEFORE}"12env | grep -v PATH= | grep -v IFS= | grep -v NVM_ | sort >> "${BEFORE}"12env | grep -v PATH= | grep -v IFS= | grep -v NVM_ | grep -v TRAVIS_ | sort >> "${BEFORE}"1314set +e # TODO: fix15\. ../../nvm.sh16set -e
2 unmodified lines
1920nvm unload2122typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${AFTER}"23env | grep -v PATH= | grep -v IFS= | sort >> "${AFTER}"23env | grep -v PATH= | grep -v IFS= | grep -v TRAVIS_ | sort >> "${AFTER}"2425! type nvm > /dev/null 2>&1 || die "nvm not unloaded"2627DIFF="$(diff "${BEFORE}" "${AFTER}" ||:)"28[ -z "${DIFF}" ] || die "function pollution found: ${DIFF}"28[ -z "${DIFF}" ] || die "function pollution found: >${DIFF}<"2930cleanup