From 9c33f4d91cf2bd161aa6acb506d94144a27ce1df Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Mon, 17 Oct 2016 15:07:42 +0100 Subject: [PATCH] Test set NVM_DIR if not exist --- ...k zsh-nvm exports NVM_DIR if it doesn't exist | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tests/loading/Check zsh-nvm exports NVM_DIR if it doesn't exist diff --git a/tests/loading/Check zsh-nvm exports NVM_DIR if it doesn't exist b/tests/loading/Check zsh-nvm exports NVM_DIR if it doesn't exist new file mode 100755 index 0000000..7500da6 --- /dev/null +++ b/tests/loading/Check zsh-nvm exports NVM_DIR if it doesn't exist @@ -0,0 +1,16 @@ +source ../common.sh + +# We don't need to actually load nvm for this test +export ZSH_NVM_NO_LOAD=true + +# Unset NVM_DIR +unset NVM_DIR + +# Check NVM_DIR is unset +[[ -z "$NVM_DIR" ]] || die "NVM_DIR already set" + +# Load zsh-nvm +load_zsh_nvm + +# Check NVM_DIR is now set to our default +[[ "$NVM_DIR" == "$HOME/.nvm" ]] || die "NVM_DIR wasn't set to \$HOME/.nvm"