Skip to content
Myr

[Tests] add some `nvm_do_install` tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 4618ce0 · Browse files · 1 file+10 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−0 removed

  • tests:+10 added−0 removed

1 file+10 added−0 removed

modified:test/install_script/nvm_do_install+10 added
4 unmodified lines
5NVM_ENV=testing \. ../../install.sh67#nvm_do_install is available8type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'910FILE_PATH="$(pwd)/nvm_do_install"11echo $FILE_PATH12$(NVM_DIR="${FILE_PATH}" nvm_do_install >/dev/null 2>&1)13EXIT_CODE=$(echo $?)14[ "${EXIT_CODE}" = '1' ] || die "nvm_do_install should fail if NVM_DIR is a file: expected 1, got <${EXIT_CODE}>"1516ACTUAL="$(NVM_DIR="${FILE_PATH}" nvm_do_install 2>&1)"17EXPECTED="File \"${FILE_PATH}\" has the same name as installation directory."18[ "${ACTUAL}" = "${EXPECTED}" ] || die "got <${ACTUAL}>, expected <${EXPECTED}>"