Jordan Harband | 0b4c1e1 | 2015-02-01 13:02:46 -0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | |
| 4 | die () { echo $@ ; exit 1; } |
| 5 | |
Qiangjun Ran | cadbbce | 2016-11-04 13:15:18 +0800 | [diff] [blame^] | 6 | \. ../../../nvm.sh |
Jordan Harband | 0b4c1e1 | 2015-02-01 13:02:46 -0800 | [diff] [blame] | 7 | |
Quildreen Motta | 730b253 | 2016-07-05 21:40:45 -0300 | [diff] [blame] | 8 | EXPECTED_OUTPUT='N/A: version "v0.2" is not yet installed. |
| 9 | |
| 10 | You need to run "nvm install 0.2" to install it before using it.' |
| 11 | [ "_$(nvm run 0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled node version failed to error out correctly" |
| 12 | |
| 13 | EXPECTED_OUTPUT='N/A: version "iojs-v0.2" is not yet installed. |
| 14 | |
| 15 | You need to run "nvm install iojs-0.2" to install it before using it.' |
| 16 | [ "_$(nvm run iojs-0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled iojs version failed to error out correctly" |