mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-04-03 11:34:50 +08:00
- `nvm-exec` test: expect "Found .nvmrc" message in output, since `nvm_rc_version` now outputs it to stdout via fd 3 redirection (ef162036) - `nvm_install_binary_nosource`: fix exit code capture by running the command directly instead of inside a subshell with `echo $?` (05d78477) - `nvm_iojs_version_has_solaris_binary`: bare versions like `v3.3.1` (without `iojs-` prefix) are node versions and should be rejected. The old tests relied on the buggy comparison that let them through (53e6244a) - `nvm_get_arch_unofficial`: copy `uname` into the chroot. The old test passed only because the unconditional `NVM_ARCH=x64-musl` masked the missing binary, but the `case` fix now requires a real arch to match (39e71eab)
25 lines
885 B
Bash
Executable File
25 lines
885 B
Bash
Executable File
#!/bin/sh
|
|
|
|
die () { echo "$@" ; exit 1; }
|
|
|
|
: nvm.sh
|
|
\. ../../../nvm.sh
|
|
\. ../../common.sh
|
|
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary ""
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "foo"
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "v1.1.0"
|
|
|
|
# Non-iojs versions should fail (version is unchanged after stripping iojs prefix)
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "v4.0.0"
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "v8.0.0"
|
|
|
|
# Bare versions without iojs- prefix are node versions, not iojs
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "v3.3.1"
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "v3.3.2"
|
|
assert_not_ok nvm_iojs_version_has_solaris_binary "v3.4.1"
|
|
|
|
assert_ok nvm_iojs_version_has_solaris_binary "iojs-v3.3.1"
|
|
assert_ok nvm_iojs_version_has_solaris_binary "iojs-v3.3.2"
|
|
assert_ok nvm_iojs_version_has_solaris_binary "iojs-v3.4.1"
|