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
23
test/fast/Listing versions/Running 'nvm ls' with nounset should not fail
Executable file
23
test/fast/Listing versions/Running 'nvm ls' with nounset should not fail
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
die () { echo "$@" ; exit 1; }
|
||||
|
||||
\. ../../../nvm.sh
|
||||
\. ../../common.sh
|
||||
|
||||
make_fake_node v0.12.34 || die 'fake v0.12.34 could not be made'
|
||||
|
||||
# Enable no unset variable
|
||||
set -u
|
||||
|
||||
# Try an alias that does not exist
|
||||
output=$(nvm ls 99 2>&1 1>/dev/null || true)
|
||||
test -z "${output}" || die "1: expected empty; got >${output}"
|
||||
|
||||
# Try a version that does not exist
|
||||
output=$(nvm ls 0.12.00 2>&1 1>/dev/null || true)
|
||||
test -z "${output}" || die "2: expected empty; got >${output}"
|
||||
|
||||
# Try a version that does exist
|
||||
output=$(nvm ls 0.12.34 2>&1 1>/dev/null || true)
|
||||
test -z "${output}" || die "3: expected empty; got >${output}"
|
||||
Reference in New Issue
Block a user