Skip to content
Myr

Cleaning up install_script 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 21534ec · Browse files · 3 files+22 added−11 removed
This commit

State

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

Diff stats

3 files+22 added−11 removed

  • tests:+20 added−9 removed
  • other:+2 added−2 removed

3 files+22 added−11 removed

modified:test/install_script/nvm_do_install+4 added-1 removed
1#!/bin/sh23die () { echo $@ ; exit 1; }45NVM_ENV=testing . ../../install.sh67#nvm_do_install is available6type nvm_do_install > /dev/null 2>&18type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'9
modified:test/install_script/nvm_reset+16 added-8 removed
1#!/bin/sh23cleanup () {4 unset -f safe_type5}6die () { echo $@ ; cleanup ; exit 1; }78NVM_ENV=testing . ../../install.sh910safe_type() {6 type "$1" > /dev/null 2>&1 && return 0 || return 111 type "$1" > /dev/null 2>&112}1314# Check nvm_reset exists10type nvm_reset > /dev/null 2>&115safe_type nvm_reset || die 'nvm_reset is not available'1617# Apply nvm_reset18nvm_reset1920# The names should be unset16! safe_type nvm_do_install && \17 ! safe_type nvm_has && \18 ! safe_type nvm_download && \19 ! safe_type install_nvm_as_script && \20 ! safe_type install_nvm_from_git && \21 ! safe_type nvm_reset21! safe_type nvm_do_install || die 'nvm_do_install is still available'22! safe_type nvm_has || die 'nvm_has is still available'23! safe_type nvm_download || die 'nvm_download is still available'24! safe_type install_nvm_as_script || die 'install_nvm_as_script is still available'25! safe_type install_nvm_from_git || die 'install_nvm_from_git is still available'26! safe_type nvm_reset || die 'nvm_reset is still available'2728cleanup29
modified:package.json+2 added-2 removed