mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-19 20:13:44 +00:00
23 lines
465 B
Bash
Executable File
23 lines
465 B
Bash
Executable File
#!/bin/sh
|
|
|
|
die () { echo "$@" ; exit 1; }
|
|
|
|
\. ../../../nvm.sh
|
|
|
|
REMOTE="${PWD}/mocks/nvm_ls_remote.txt"
|
|
nvm_ls_remote() {
|
|
cat "${REMOTE}"
|
|
}
|
|
REMOTE_IOJS="${PWD}/mocks/nvm_ls_remote_iojs.txt"
|
|
nvm_ls_remote_iojs() {
|
|
cat "${REMOTE_IOJS}"
|
|
}
|
|
ACTUAL="$(nvm install lts/ARGON 2>&1)"
|
|
if [ $? -ne 3 ]; then
|
|
die "Expected exit code of 3, got $?"
|
|
fi
|
|
|
|
EXPECTED='LTS names must be lowercase'
|
|
|
|
[ "${ACTUAL}" = "${EXPECTED}" ] || die "Expected >${EXPECTED}<, got >${ACTUAL}<"
|