[Tests] `nvm_command_info`: make error output more helpful
parent
226487d358
commit
9daf26f0a0
|
@ -46,9 +46,13 @@ WGET_EXPECTED_INFO="$(type wget)"
|
|||
cleanup
|
||||
|
||||
# 4. nvm_command_info() should not have standard error
|
||||
nvm_command_info ls 2>&1 >/dev/null | grep . && die "\`nvm_command_info ls\` should not return standard error message(stage 4)"
|
||||
nvm_command_info rm 2>&1 >/dev/null | grep . && die "\`nvm_command_info rm\` should not return standard error message(stage 4)"
|
||||
nvm_command_info git 2>&1 >/dev/null | grep . && die "\`nvm_command_info git\` should not return standard error message(stage 4)"
|
||||
nvm_command_info grep 2>&1 >/dev/null | grep . && die "\`nvm_command_info grep\` should not return standard error message(stage 4)"
|
||||
OUTPUT="$(nvm_command_info ls 2>&1 >/dev/null)"
|
||||
[ -z "${OUTPUT}" ] || die "\`nvm_command_info ls\` expected no stderr; got >${OUTPUT}< (stage 4)"
|
||||
OUTPUT="$(nvm_command_info rm 2>&1 >/dev/null)"
|
||||
[ -z "${OUTPUT}" ] || die "\`nvm_command_info rm\` expected no stderr; got >${OUTPUT}< (stage 4)"
|
||||
OUTPUT="$(nvm_command_info git 2>&1 >/dev/null)"
|
||||
[ -z "${OUTPUT}" ] || die "\`nvm_command_info git\` expected no stderr; got >${OUTPUT}< (stage 4)"
|
||||
OUTPUT="$(nvm_command_info grep 2>&1 >/dev/null)"
|
||||
[ -z "${OUTPUT}" ] || die "\`nvm_command_info grep\` expected no stderr; got >${OUTPUT}< (stage 4)"
|
||||
|
||||
cleanup
|
||||
|
|
Loading…
Reference in New Issue