mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-30 17:25:51 +08:00
[meta] Rename some files to be more cross platform
This commit is contained in:
committed by
Jordan Harband
parent
4e9df33cb7
commit
9849bf494d
22
test/slow/nvm use/Running 'nvm use --lts=foo' uses latest 'foo' LTS version
Executable file
22
test/slow/nvm use/Running 'nvm use --lts=foo' uses latest 'foo' LTS version
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo "$@" ; exit 1; }
|
||||
|
||||
\. ../../../nvm.sh
|
||||
|
||||
nvm deactivate 2>&1 >/dev/null || die 'deactivate failed'
|
||||
|
||||
nvm use --lts=testing || die 'nvm use --lts=testing failed'
|
||||
OUTPUT="$(nvm current)"
|
||||
EXPECTED_OUTPUT="$(nvm_resolve_alias 'lts/testing')"
|
||||
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||
|| die "'nvm use --lts=testing' + 'nvm current' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||
|
||||
OUTPUT="$(nvm use --silent --lts=testing)"
|
||||
EXPECTED_OUTPUT=""
|
||||
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||
|| die "'nvm use --silent --lts=testing' output was not silenced '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||
Reference in New Issue
Block a user