2015-02-02 05:02:46 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2015-02-02 05:02:46 +08:00
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../../nvm.sh
|
2015-02-02 05:02:46 +08:00
|
|
|
|
2016-07-06 08:40:45 +08:00
|
|
|
EXPECTED_OUTPUT='N/A: version "v0.2" is not yet installed.
|
|
|
|
|
|
|
|
You need to run "nvm install 0.2" to install it before using it.'
|
|
|
|
[ "_$(nvm run 0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled node version failed to error out correctly"
|
|
|
|
|
|
|
|
EXPECTED_OUTPUT='N/A: version "iojs-v0.2" is not yet installed.
|
|
|
|
|
|
|
|
You need to run "nvm install iojs-0.2" to install it before using it.'
|
|
|
|
[ "_$(nvm run iojs-0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled iojs version failed to error out correctly"
|