diff --git a/.travis.yml b/.travis.yml index d3491ce..6d3ef3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,11 @@ env: - SHELL=bash TEST_SUITE=slow - SHELL=zsh TEST_SUITE=slow - SHELL=ksh TEST_SUITE=slow + - SHELL=sh TEST_SUITE=sourcing + - SHELL=dash TEST_SUITE=sourcing + - SHELL=bash TEST_SUITE=sourcing + - SHELL=zsh TEST_SUITE=sourcing + - SHELL=ksh TEST_SUITE=sourcing - SHELL=sh TEST_SUITE=installation - SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=dash TEST_SUITE=installation @@ -29,3 +34,4 @@ env: - SHELL=zsh TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=ksh TEST_SUITE=installation - SHELL=ksh TEST_SUITE=installation WITHOUT_CURL=1 + diff --git a/package.json b/package.json index e1d282f..8b8ef5c 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "test": "urchin test", "test/fast": "urchin -f test/fast", "test/slow": "urchin -f test/slow", - "test/installation": "urchin -f test/installation" + "test/installation": "urchin -f test/installation", + "test/sourcing": "urchin -f test/sourcing" }, "repository": { "type": "git", diff --git a/test/installation/sourcing/setup_dir b/test/installation/sourcing/setup_dir deleted file mode 100755 index 7509942..0000000 --- a/test/installation/sourcing/setup_dir +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -mkdir -p ../../../alias - -. ../../../nvm.sh -nvm install 0.10.1 -nvm unload || echo >&2 'nvm unload failed' - diff --git a/test/installation/sourcing/teardown_dir b/test/installation/sourcing/teardown_dir deleted file mode 100755 index 614e020..0000000 --- a/test/installation/sourcing/teardown_dir +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -rm -rf ../../../alias -rm -rf ../../../v0.10.1 - diff --git a/test/installation/sourcing/Sourcing nvm.sh should use the default if available b/test/sourcing/Sourcing nvm.sh should use the default if available similarity index 76% rename from test/installation/sourcing/Sourcing nvm.sh should use the default if available rename to test/sourcing/Sourcing nvm.sh should use the default if available index beb5db9..57cb839 100755 --- a/test/installation/sourcing/Sourcing nvm.sh should use the default if available +++ b/test/sourcing/Sourcing nvm.sh should use the default if available @@ -2,9 +2,9 @@ die () { echo $@ ; exit 1; } -echo '0.10.1' > ../../../alias/default || die 'creation of default alias failed' +echo '0.10.1' > ../../alias/default || die 'creation of default alias failed' -. ../../../nvm.sh || die 'sourcing returned nonzero exit code' +. ../../nvm.sh || die 'sourcing returned nonzero exit code' NVM_LS_CURRENT="$(nvm ls current | \grep -o v0.10.1)" [ "_$NVM_LS_CURRENT" = '_v0.10.1' ] || die "'nvm ls current' did not return '-> v0.10.1', got '$NVM_LS_CURRENT'" diff --git a/test/sourcing/setup b/test/sourcing/setup new file mode 100755 index 0000000..4d5a97b --- /dev/null +++ b/test/sourcing/setup @@ -0,0 +1,12 @@ +#!/bin/sh + +mkdir -p ../../alias +rm -f ../../.nvmrc +rm -rf ../../v0.10.7 +rm -rf ../../v0.9.7 +rm -rf ../../v0.9.12 + +. ../../nvm.sh +nvm install 0.10.1 || echo >&2 'nvm install 0.10.1 failed' +nvm unload || echo >&2 'nvm unload failed' + diff --git a/test/sourcing/teardown b/test/sourcing/teardown new file mode 100755 index 0000000..6a31472 --- /dev/null +++ b/test/sourcing/teardown @@ -0,0 +1,7 @@ +#!/bin/sh + +rm -rf ../../alias +rm -rf ../../v0.10.1 +rm -rf ../../v0.10.2 +rm -f ../../.nvmrc +