nvm/test/slow/nvm run/Running 'nvm run --lts' sho...

16 lines
579 B
Plaintext
Raw Normal View History

2016-07-18 15:35:01 +08:00
#!/bin/sh
set -ex
die () { echo "$@" ; exit 1; }
2016-07-18 15:35:01 +08:00
\. ../../../nvm.sh
2016-07-18 15:35:01 +08:00
OUTPUT="$(nvm run --silent --lts --version)"
EXPECTED_OUTPUT="$(nvm_match_version 'lts/*')"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm run --lts\` failed to run with the correct version; expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
OUTPUT="$(nvm run --silent --lts=argon --version)"
EXPECTED_OUTPUT="$(nvm_match_version 'lts/argon')"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm run --lts=argon\` failed to run with the correct version; expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"