-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix]
nvm_ls
: zsh: unset markdirs
and local_options
Fixes #2315.
- Loading branch information
1 parent
4436638
commit 96069da
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
test/fast/Listing versions/Running "nvm ls" should not show a trailing slash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/zsh | ||
|
||
\. ../../../nvm.sh | ||
\. ../../common.sh | ||
|
||
if type setopt >/dev/null 2>&1; then setopt local_options markdirs; fi | ||
|
||
die () { | ||
if type unsetopt >/dev/null 2>&1; then unsetopt local_options markdirs; fi | ||
echo "$@"; | ||
exit 1; | ||
} | ||
|
||
make_fake_node v0.0.1 | ||
make_fake_node v0.0.3 | ||
make_fake_node v0.0.9 | ||
make_fake_node v0.3.1 | ||
make_fake_node v0.3.3 | ||
make_fake_node v0.3.9 | ||
make_fake_node v0.12.87 | ||
make_fake_node v0.12.9 | ||
make_fake_iojs v0.1.2 | ||
make_fake_iojs v0.10.2 | ||
|
||
OUTPUT="$(nvm_ls)" | ||
EXPECTED_OUTPUT="v0.0.1 | ||
v0.0.3 | ||
v0.0.9 | ||
iojs-v0.1.2 | ||
v0.3.1 | ||
v0.3.3 | ||
v0.3.9 | ||
iojs-v0.10.2 | ||
v0.12.9 | ||
v0.12.87" | ||
if nvm_has_system_node || nvm_has_system_iojs; then | ||
EXPECTED_OUTPUT="${EXPECTED_OUTPUT} | ||
system" | ||
fi | ||
[ "${OUTPUT-}" = "${EXPECTED_OUTPUT-}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<" |