mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-01-30 09:47:14 +08:00
Setup urchin tests with test for loading
This commit is contained in:
parent
aa1fccff4b
commit
52b486bca8
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
|
tests/.urchin.log
|
||||||
previous_version
|
previous_version
|
||||||
|
11
tests/common.sh
Normal file
11
tests/common.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
export test_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||||
|
export repo_dir="$test_dir/.."
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo $@
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
load_zsh_nvm() {
|
||||||
|
source "$repo_dir/zsh-nvm.plugin.zsh"
|
||||||
|
}
|
10
tests/loading/Check zsh-nvm is loaded
Executable file
10
tests/loading/Check zsh-nvm is loaded
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
source ../common.sh
|
||||||
|
|
||||||
|
# Check ZSH_NVM_DIR isn't already set
|
||||||
|
[[ -z ${ZSH_NVM_DIR+x} ]] || die "ZSH_NVM_DIR already set"
|
||||||
|
|
||||||
|
# Load zsh-nvm
|
||||||
|
load_zsh_nvm
|
||||||
|
|
||||||
|
# Check ZSH_NVM_DIR is now set
|
||||||
|
[[ ! -z ${ZSH_NVM_DIR+x} ]] || die "ZSH_NVM_DIR wasn't set"
|
Loading…
Reference in New Issue
Block a user