Skip to content

Commit

Permalink
test/.../nvm_stdout_is_terminal: bugfix (die has to be called in main…
Browse files Browse the repository at this point in the history
… process)
  • Loading branch information
jcsahnwaldt committed Feb 27, 2019
1 parent 65ba65c commit dca23a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/fast/Unit tests/nvm_stdout_is_terminal
Expand Up @@ -19,7 +19,7 @@ else
! nvm_stdout_is_terminal </dev/null || die 'nvm_stdout_is_terminal should be false when stdin is redirected'
fi

(! nvm_stdout_is_terminal || die 'nvm_stdout_is_terminal should be false when stdout goes to a pipe') | cat
(nvm_stdout_is_terminal || echo "boo!") | read && die 'nvm_stdout_is_terminal should be false when stdout goes to a pipe'
! nvm_stdout_is_terminal >/dev/null || die 'nvm_stdout_is_terminal should be false when stdout goes to /dev/null'
! nvm_stdout_is_terminal >"$tempfile" || die 'nvm_stdout_is_terminal should be false when stdout goes to a file'
[ "$(nvm_stdout_is_terminal; echo $?)" = "1" ] || die 'nvm_stdout_is_terminal should be false in command substitution'
Expand Down

0 comments on commit dca23a7

Please sign in to comment.