From ecba036cbfb3af396640ac4e565a64ea77b6c3cb Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 21 Dec 2015 23:59:44 -0800 Subject: [PATCH] [Tests] show `type` output for debugging --- test/install_script/nvm_reset | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/install_script/nvm_reset b/test/install_script/nvm_reset index 9f8735a..bc86aa6 100755 --- a/test/install_script/nvm_reset +++ b/test/install_script/nvm_reset @@ -5,12 +5,21 @@ cleanup () { } die () { echo $@ ; cleanup ; exit 1; } -NVM_ENV=testing . ../../install.sh - safe_type() { - type "$1" > /dev/null 2>&1 + type "$1" } +# precondition: the names should be unset +! safe_type nvm_do_install || die 'nvm_do_install is still available' +! safe_type nvm_has || die 'nvm_has is still available' +! safe_type nvm_download || die 'nvm_download is still available' +! safe_type install_nvm_as_script || die 'install_nvm_as_script is still available' +! safe_type install_nvm_from_git || die 'install_nvm_from_git is still available' +! safe_type nvm_reset || die 'nvm_reset is still available' +! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available' + +NVM_ENV=testing . ../../install.sh + # Check nvm_reset exists safe_type nvm_reset || die 'nvm_reset is not available'