2015-09-29 07:02:34 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2015-09-29 07:02:34 +08:00
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../../nvm.sh
|
|
|
|
\. ../../common.sh
|
2015-09-29 07:02:34 +08:00
|
|
|
|
|
|
|
# Invalid version numbers fail
|
|
|
|
assert_not_ok nvm_has_solaris_binary ""
|
|
|
|
assert_not_ok nvm_has_solaris_binary "foo"
|
|
|
|
|
|
|
|
# "Invalid" node version numbers fail
|
|
|
|
assert_not_ok nvm_has_solaris_binary "v1.0.0"
|
|
|
|
assert_not_ok nvm_has_solaris_binary "v3.3.1"
|
|
|
|
|
|
|
|
# Valid io.js version numbers that have a Solaris binary succeed
|
|
|
|
assert_ok nvm_has_solaris_binary "iojs-v3.3.1"
|
|
|
|
|
|
|
|
# Invvalid io.js version numbers fail
|
|
|
|
assert_not_ok nvm_has_solaris_binary "iojs-v0.12.7"
|
|
|
|
|
|
|
|
# Valid node version numbers that don't have a Solaris binary fail
|
|
|
|
assert_not_ok nvm_has_solaris_binary "v0.8.5"
|
|
|
|
|
|
|
|
# Valid node version numbers that have a Solaris binary succeed
|
|
|
|
assert_ok nvm_has_solaris_binary "v0.8.6"
|
|
|
|
assert_ok nvm_has_solaris_binary "v0.10.0"
|
|
|
|
assert_ok nvm_has_solaris_binary "v0.12.7"
|
|
|
|
|
|
|
|
# Valid "merged" version numbers succeed
|
|
|
|
assert_ok nvm_has_solaris_binary "v4.0.0"
|
|
|
|
assert_ok nvm_has_solaris_binary "v4.1.1"
|