Updates tests for the new output messages

This commit is contained in:
Quildreen Motta
2016-07-05 21:40:45 -03:00
parent 0f26656c2c
commit 730b253174
2 changed files with 15 additions and 4 deletions

View File

@@ -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"