You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
864 B
25 lines
864 B
![]()
10 years ago
|
#!/bin/sh
|
||
|
|
||
![]()
8 years ago
|
\. ../../../nvm.sh
|
||
|
\. ../../common.sh
|
||
![]()
10 years ago
|
|
||
![]()
8 years ago
|
die () { echo "$@" ; exit 1; }
|
||
![]()
10 years ago
|
|
||
|
if [ -n "$ZSH_VERSION" ]; then
|
||
|
# set clobber option in order to test that this does not produce any
|
||
|
# incompatibilities
|
||
|
setopt noclobber
|
||
|
fi
|
||
|
|
||
![]()
9 years ago
|
nvm alias test-stable-1 0.0.2 || die '`nvm alias test-stable-1 0.0.2` failed'
|
||
![]()
10 years ago
|
|
||
![]()
9 years ago
|
OUTPUT="$(nvm alias test-stable-1 | strip_colors)"
|
||
|
EXPECTED_OUTPUT='test-stable-1 -> 0.0.2 (-> v0.0.2)'
|
||
|
echo "$OUTPUT" | \grep -F "$EXPECTED_OUTPUT" || die "nvm alias test-stable-1 0.0.2 did not set test-stable-1 to 0.0.2: got '$OUTPUT'"
|
||
![]()
10 years ago
|
|
||
![]()
9 years ago
|
nvm alias test-stable-1 0.0.1 || die '`nvm alias test-stable-1 0.0.1` failed'
|
||
![]()
10 years ago
|
|
||
![]()
9 years ago
|
OUTPUT="$(nvm alias test-stable-1 | strip_colors)"
|
||
|
EXPECTED_OUTPUT='test-stable-1 -> 0.0.1 (-> v0.0.1)'
|
||
|
echo "$OUTPUT" | \grep -F "$EXPECTED_OUTPUT" || die "nvm alias test-stable-1 0.0.1 did not set test-stable-1 to 0.0.1: got '$OUTPUT'"
|