mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-11 06:41:50 +00:00
Add test cases for optional version parameter positioning.
This commit is contained in:
parent
3a242147de
commit
81248bca38
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo "$@" ; exit 1; }
|
||||||
|
|
||||||
|
\. ../../nvm.sh
|
||||||
|
|
||||||
|
NVM_TEST_VERSION=v0.10.7
|
||||||
|
|
||||||
|
# Remove the stuff we're clobbering.
|
||||||
|
remove_install () { [ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION }
|
||||||
|
|
||||||
|
# Install with version param first
|
||||||
|
remove_install
|
||||||
|
nvm install $NVM_TEST_VERSION --no-progress || die "install $NVM_TEST_VERSION failed with version param as first parameter"
|
||||||
|
|
||||||
|
# Install with version param last
|
||||||
|
remove_install
|
||||||
|
nvm install --no-progress $NVM_TEST_VERSION || die "install $NVM_TEST_VERSION failed with version param as last parameter"
|
||||||
|
|
||||||
|
# Install with version param between config parameters
|
||||||
|
remove_install
|
||||||
|
nvm install --skip-default-packages $NVM_TEST_VERSION --no-progress || die "install $NVM_TEST_VERSION failed with version param between config parameters"
|
Loading…
Reference in New Issue
Block a user