mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-02-27 10:25:31 +08:00
Test set NVM_DIR if not exist
This commit is contained in:
parent
ba6faa1b90
commit
eba3a816c4
16
tests/loading/Check zsh-nvm exports NVM_DIR if it doesn't exist
Executable file
16
tests/loading/Check zsh-nvm exports NVM_DIR if it doesn't exist
Executable file
@ -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"
|
Loading…
Reference in New Issue
Block a user