mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-26 19:41:34 +00:00
Updates tests for the new output messages
This commit is contained in:
@@ -11,7 +11,9 @@ mkdir -p "$(nvm_version_path v0.1.2)"
|
||||
|
||||
OUTPUT="$(nvm_ensure_version_installed foo 2>&1)"
|
||||
EXIT_CODE=$?
|
||||
EXPECTED_OUTPUT='N/A: version "foo" is not yet installed'
|
||||
EXPECTED_OUTPUT='N/A: version "foo" is not yet installed.
|
||||
|
||||
You need to run "nvm install foo" to install it before using it.'
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed foo' to give $EXPECTED_OUTPUT, got $OUTPUT"
|
||||
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed foo' to exit with 1, got $EXIT_CODE"
|
||||
|
||||
@@ -23,7 +25,9 @@ EXIT_CODE=$?
|
||||
# Special case for "iojs"
|
||||
OUTPUT="$(nvm_ensure_version_installed iojs 2>&1)"
|
||||
EXIT_CODE=$?
|
||||
EXPECTED_OUTPUT='N/A: version "iojs" is not yet installed'
|
||||
EXPECTED_OUTPUT='N/A: version "iojs" is not yet installed.
|
||||
|
||||
You need to run "nvm install iojs" to install it before using it.'
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed iojs' to give $EXPECTED_OUTPUT, got $OUTPUT"
|
||||
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed iojs' to exit with 1, got $EXIT_CODE"
|
||||
|
||||
|
Reference in New Issue
Block a user