Browse Source

Remove useless trailing newlines

Peter Dave Hello 7 years ago
parent
commit
2cd2c0f72e
  1. 1
      .dockerignore
  2. 1
      .gitattributes
  3. 1
      CONTRIBUTING.md
  4. 1
      Dockerfile
  5. 1
      LICENSE.md
  6. 1
      bash_completion
  7. 1
      test/fast/Aliases/"nvm alias" should not accept aliases with slashes
  8. 1
      test/fast/Aliases/"nvm unalias" should not accept aliases with slashes
  9. 1
      test/fast/Aliases/Running "nvm alias" lists implicit aliases when they do not exist
  10. 1
      test/fast/Aliases/circular/setup
  11. 1
      test/fast/Aliases/circular/teardown
  12. 1
      test/fast/Listing versions/teardown
  13. 1
      test/fast/Unit tests/nvm_alias
  14. 1
      test/fast/Unit tests/nvm_alias_path
  15. 1
      test/fast/Unit tests/nvm_find_up
  16. 1
      test/fast/Unit tests/nvm_format_version
  17. 1
      test/fast/Unit tests/nvm_has
  18. 1
      test/fast/Unit tests/nvm_ls_remote_iojs
  19. 1
      test/fast/Unit tests/nvm_num_version_groups
  20. 1
      test/fast/Unit tests/nvm_print_implicit_alias errors
  21. 1
      test/fast/Unit tests/nvm_remote_versions
  22. 1
      test/fast/Unit tests/nvm_tree_contains_path
  23. 1
      test/fast/Unit tests/nvm_validate_implicit_alias
  24. 1
      test/fast/Unit tests/nvm_version_dir
  25. 1
      test/fast/Unit tests/nvm_version_greater
  26. 1
      test/fast/Unit tests/nvm_version_path
  27. 1
      test/install_script/nvm_do_install
  28. 1
      test/install_script/nvm_install_dir
  29. 1
      test/install_script/nvm_install_with_aliased_dot
  30. 1
      test/install_script/nvm_reset
  31. 1
      test/install_script/nvm_source
  32. 1
      test/installation_iojs/setup_dir
  33. 1
      test/installation_iojs/teardown_dir
  34. 1
      test/installation_node/install from source implicitly
  35. 2
      test/installation_node/install hook
  36. 2
      test/installation_node/install version specified in .nvmrc from binary
  37. 2
      test/installation_node/install version specified in .nvmrc from source
  38. 1
      test/installation_node/setup_dir
  39. 1
      test/installation_node/teardown_dir
  40. 1
      test/slow/node 0.6.21 should install 0.6.21-pre
  41. 1
      test/slow/nvm exec/Preamble works and respects "silent" flag
  42. 1
      test/slow/nvm exec/Running "nvm exec" should pick up .nvmrc version
  43. 1
      test/slow/nvm exec/setup_dir
  44. 1
      test/slow/nvm exec/teardown_dir
  45. 1
      test/slow/nvm reinstall-packages/Running "nvm copy-packages $(nvm ls current)" should error out
  46. 1
      test/slow/nvm reinstall-packages/setup_dir
  47. 1
      test/slow/nvm reinstall-packages/teardown_dir
  48. 1
      test/slow/nvm run/Running "nvm run --harmony --version" should work
  49. 1
      test/slow/nvm run/Running "nvm run 0.x" should work
  50. 1
      test/slow/nvm run/Running "nvm run" should pick up .nvmrc version
  51. 1
      test/slow/nvm run/setup_dir
  52. 1
      test/slow/nvm run/teardown_dir
  53. 1
      test/slow/nvm_get_latest/nvm_get_latest
  54. 1
      test/slow/nvm_get_latest/nvm_get_latest failed redirect
  55. 1
      test/sourcing/Sourcing nvm.sh should use the default if available
  56. 1
      test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it
  57. 1
      test/sourcing/Sourcing nvm.sh with --install should install the default
  58. 1
      test/sourcing/Sourcing nvm.sh with --no-use should not use anything
  59. 1
      test/sourcing/setup
  60. 1
      test/sourcing/teardown

1
.dockerignore

@ -14,4 +14,3 @@ npm-debug.log @@ -14,4 +14,3 @@ npm-debug.log
.DS_Store
current

1
.gitattributes vendored

@ -1,2 +1 @@ @@ -1,2 +1 @@
* eol=lf

1
CONTRIBUTING.md

@ -17,4 +17,3 @@ For pull requests: @@ -17,4 +17,3 @@ For pull requests:
Even if you don't have all of these items covered, please still feel free to submit a PR/issue! Someone else may be inspired and volunteer to complete it for you.
Thanks again!

1
Dockerfile

@ -106,4 +106,3 @@ RUN bash -c 'source $HOME/.nvm/nvm.sh && \ @@ -106,4 +106,3 @@ RUN bash -c 'source $HOME/.nvm/nvm.sh && \
WORKDIR /home/nvm/.nvm
ENTRYPOINT /bin/bash

1
LICENSE.md

@ -18,4 +18,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR @@ -18,4 +18,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1
bash_completion

@ -95,4 +95,3 @@ if [[ -n ${ZSH_VERSION-} ]]; then @@ -95,4 +95,3 @@ if [[ -n ${ZSH_VERSION-} ]]; then
fi
complete -o default -F __nvm nvm

1
test/fast/Aliases/"nvm alias" should not accept aliases with slashes

@ -24,4 +24,3 @@ EXPECTED_OUTPUT="Aliases in subdirectories are not supported." @@ -24,4 +24,3 @@ EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
EXIT_CODE="$(nvm alias /bar baz >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to create an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"

1
test/fast/Aliases/"nvm unalias" should not accept aliases with slashes

@ -24,4 +24,3 @@ EXPECTED_OUTPUT="Aliases in subdirectories are not supported." @@ -24,4 +24,3 @@ EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
EXIT_CODE="$(nvm unalias /bar >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to remove an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"

1
test/fast/Aliases/Running "nvm alias" lists implicit aliases when they do not exist

@ -24,4 +24,3 @@ EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)" @@ -24,4 +24,3 @@ EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)"
IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")"
echo "$NVM_ALIAS_OUTPUT" | \grep -F "iojs -> $EXPECTED_IOJS (-> $IOJS_VERSION) (default)" \
|| die "nvm alias did not contain the default local iojs version; got '$NVM_ALIAS_OUTPUT'"

1
test/fast/Aliases/circular/setup

@ -7,4 +7,3 @@ echo three > ../../../../alias/two @@ -7,4 +7,3 @@ echo three > ../../../../alias/two
echo one > ../../../../alias/three
echo two > ../../../../alias/four

1
test/fast/Aliases/circular/teardown

@ -7,4 +7,3 @@ rm -f ../../../../alias/two @@ -7,4 +7,3 @@ rm -f ../../../../alias/two
rm -f ../../../../alias/three
rm -f ../../../../alias/four

1
test/fast/Listing versions/teardown

@ -14,4 +14,3 @@ rmdir ../../../versions >/dev/null 2>&1 @@ -14,4 +14,3 @@ rmdir ../../../versions >/dev/null 2>&1
unalias nvm_has_system_node >/dev/null 2>&1
rm -f ../../../alias/stable >/dev/null 2>&1
rm -f ../../../alias/unstable >/dev/null 2>&1

1
test/fast/Unit tests/nvm_alias

@ -30,4 +30,3 @@ OUTPUT="$(nvm_alias test)" @@ -30,4 +30,3 @@ OUTPUT="$(nvm_alias test)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias test' produced wrong output; got $OUTPUT"
cleanup

1
test/fast/Unit tests/nvm_alias_path

@ -5,4 +5,3 @@ die () { echo "$@" ; exit 1; } @@ -5,4 +5,3 @@ die () { echo "$@" ; exit 1; }
\. ../../../nvm.sh
[ "_$(nvm_alias_path)" = "_$NVM_DIR/alias" ] || die "nvm_alias_path did not requrn correct location"

1
test/fast/Unit tests/nvm_find_up

@ -23,4 +23,3 @@ TEST_DIR="$PWD" @@ -23,4 +23,3 @@ TEST_DIR="$PWD"
[ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b/c/d nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up/a/b/c" ] || die "failed to find 1 level up from current dir"
cleanup

1
test/fast/Unit tests/nvm_format_version

@ -18,4 +18,3 @@ INPUT="1.2.3.4.5" @@ -18,4 +18,3 @@ INPUT="1.2.3.4.5"
OUTPUT="$(nvm_format_version "$INPUT")"
EXPECTED_OUTPUT="v1.2.3"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"

1
test/fast/Unit tests/nvm_has

@ -9,4 +9,3 @@ nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly' @@ -9,4 +9,3 @@ nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly'
[ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"
! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found"

1
test/fast/Unit tests/nvm_ls_remote_iojs

@ -35,4 +35,3 @@ iojs-v1.0.4" @@ -35,4 +35,3 @@ iojs-v1.0.4"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT"
cleanup

1
test/fast/Unit tests/nvm_num_version_groups

@ -22,4 +22,3 @@ die () { echo "$@" ; exit 1; } @@ -22,4 +22,3 @@ die () { echo "$@" ; exit 1; }
[ "~$(nvm_num_version_groups 1.2.3)" = "~3" ] || die "1.2.3 should give 3"
[ "~$(nvm_num_version_groups v1.2.3)" = "~3" ] || die "v1.2.3 should give 3"
[ "~$(nvm_num_version_groups v1.2.3.)" = "~3" ] || die "v1.2.3. should give 3"

1
test/fast/Unit tests/nvm_print_implicit_alias errors

@ -23,4 +23,3 @@ EXPECTED_SECOND_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'no @@ -23,4 +23,3 @@ EXPECTED_SECOND_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'no
SECOND_EXIT_CODE="$(nvm_print_implicit_alias local > /dev/null 2>&1 ; echo $?)"
[ "_$SECOND_EXIT_CODE" = "_2" ] \
|| die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $SECOND_EXIT_CODE"

1
test/fast/Unit tests/nvm_remote_versions

@ -75,4 +75,3 @@ EXIT_CODE="$(nvm_remote_versions iojs >/dev/null 2>&1 ; echo $?)" @@ -75,4 +75,3 @@ EXIT_CODE="$(nvm_remote_versions iojs >/dev/null 2>&1 ; echo $?)"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions iojs did not exit with 0, got $EXIT_CODE"
cleanup

1
test/fast/Unit tests/nvm_tree_contains_path

@ -29,4 +29,3 @@ nvm_tree_contains_path tmp2 tmp2/node || die '"tmp2" should contain "tmp2/node"' @@ -29,4 +29,3 @@ nvm_tree_contains_path tmp2 tmp2/node || die '"tmp2" should contain "tmp2/node"'
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
cleanup

1
test/fast/Unit tests/nvm_validate_implicit_alias

@ -18,4 +18,3 @@ nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable di @@ -18,4 +18,3 @@ nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable di
nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0"
nvm_validate_implicit_alias node || die "nvm_validate_implicit_alias node did not exit 0"
nvm_validate_implicit_alias iojs || die "nvm_validate_implicit_alias iojs did not exit 0"

1
test/fast/Unit tests/nvm_version_dir

@ -9,4 +9,3 @@ die () { echo "$@" ; exit 1; } @@ -9,4 +9,3 @@ die () { echo "$@" ; exit 1; }
[ "$(nvm_version_dir new)" = "$(nvm_version_dir)" ] || die '"nvm_version_dir new" did not return new dir path'
[ "$(nvm_version_dir old)" = "$NVM_DIR" ] || die '"nvm_version_dir old" did not return old dir path'
[ "$(nvm_version_dir foo 2>&1)" = "unknown version dir" ] || die '"nvm_version_dir foo" did not error out'

1
test/fast/Unit tests/nvm_version_greater

@ -13,4 +13,3 @@ fi @@ -13,4 +13,3 @@ fi
if nvm_version_greater 0.10.0 0.10.0; then
die '"nvm_version_greater" returned false for the same two versions'
fi

1
test/fast/Unit tests/nvm_version_path

@ -12,4 +12,3 @@ EXPECTED_OUTPUT="$NVM_DIR/foo" @@ -12,4 +12,3 @@ EXPECTED_OUTPUT="$NVM_DIR/foo"
[ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'
[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'
[ "$(nvm_version_path iojs-v0.12.0)" = "$NVM_DIR/versions/io.js/v0.12.0" ] || die 'iojs version has the wrong path'

1
test/install_script/nvm_do_install

@ -6,4 +6,3 @@ NVM_ENV=testing \. ../../install.sh @@ -6,4 +6,3 @@ NVM_ENV=testing \. ../../install.sh
#nvm_do_install is available
type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'

1
test/install_script/nvm_install_dir

@ -22,4 +22,3 @@ install_dir=$(nvm_install_dir) @@ -22,4 +22,3 @@ install_dir=$(nvm_install_dir)
[ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"
cleanup

1
test/install_script/nvm_install_with_aliased_dot

@ -20,4 +20,3 @@ nvm_do_install > /dev/null 2>&1 @@ -20,4 +20,3 @@ nvm_do_install > /dev/null 2>&1
command -v nvm || die 'nvm could not be loaded'
cleanup

1
test/install_script/nvm_reset

@ -36,4 +36,3 @@ nvm_reset || die 'nvm_reset failed' @@ -36,4 +36,3 @@ nvm_reset || die 'nvm_reset failed'
! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'
cleanup

1
test/install_script/nvm_source

@ -37,4 +37,3 @@ out=$(nvm_source "anything") @@ -37,4 +37,3 @@ out=$(nvm_source "anything")
[ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""
cleanup

1
test/installation_iojs/setup_dir

@ -3,4 +3,3 @@ @@ -3,4 +3,3 @@
if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak
fi

1
test/installation_iojs/teardown_dir

@ -14,4 +14,3 @@ fi @@ -14,4 +14,3 @@ fi
if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc
fi

1
test/installation_node/install from source implicitly

@ -21,4 +21,3 @@ nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed" @@ -21,4 +21,3 @@ nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check
[ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

2
test/installation_node/install hook

@ -37,5 +37,3 @@ ${USE_OUTPUT} @@ -37,5 +37,3 @@ ${USE_OUTPUT}
failed"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"

2
test/installation_node/install version specified in .nvmrc from binary

@ -18,5 +18,3 @@ nvm install || die "'nvm install' failed" @@ -18,5 +18,3 @@ nvm install || die "'nvm install' failed"
[ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

2
test/installation_node/install version specified in .nvmrc from source

@ -18,5 +18,3 @@ nvm install -s || "'nvm install -s' failed" @@ -18,5 +18,3 @@ nvm install -s || "'nvm install -s' failed"
[ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

1
test/installation_node/setup_dir

@ -3,4 +3,3 @@ @@ -3,4 +3,3 @@
if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak
fi

1
test/installation_node/teardown_dir

@ -12,4 +12,3 @@ fi @@ -12,4 +12,3 @@ fi
if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc
fi

1
test/slow/node 0.6.21 should install 0.6.21-pre

@ -9,4 +9,3 @@ die () { echo "$@" ; exit 1; } @@ -9,4 +9,3 @@ die () { echo "$@" ; exit 1; }
nvm install 0.6.21 || die 'v0.6.21 installation failed'
[ "_$(node -v)" = "_v0.6.21-pre" ] || die "v0.6.21-pre not installed with v0.6.21, got $(node -v)"
[ "_$(nvm current)" = "_v0.6.21" ] || die "v0.6.21-pre not reported as v0.6.21, got $(nvm current)"

1
test/slow/nvm exec/Preamble works and respects "silent" flag

@ -28,4 +28,3 @@ ${NPM_VERSION_ONE}" @@ -28,4 +28,3 @@ ${NPM_VERSION_ONE}"
OUTPUT="$(nvm exec --silent 1 npm --version | head -1)"
EXPECTED_OUTPUT="${NPM_VERSION_ONE}"
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "\`nvm exec --silent\` failed to suppress io.js preamble; expected '$EXPECTED_OUTPUT', got '$OUTPUT'"

1
test/slow/nvm exec/Running "nvm exec" should pick up .nvmrc version

@ -14,4 +14,3 @@ echo "0.10.7" > .nvmrc @@ -14,4 +14,3 @@ echo "0.10.7" > .nvmrc
[ "$(nvm exec npm --version | tail -1)" = "$NPM_VERSION_TEN" ] || die "\`nvm exec\` failed to run with the .nvmrc version"
[ "$(nvm exec npm --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm exec\` failed to print out the \"found in .nvmrc\" message"

1
test/slow/nvm exec/setup_dir

@ -8,4 +8,3 @@ nvm install --lts @@ -8,4 +8,3 @@ nvm install --lts
if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak
fi

1
test/slow/nvm exec/teardown_dir

@ -11,4 +11,3 @@ rm .nvmrc @@ -11,4 +11,3 @@ rm .nvmrc
if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc
fi

1
test/slow/nvm reinstall-packages/Running "nvm copy-packages $(nvm ls current)" should error out

@ -15,4 +15,3 @@ ACTUAL_MSG="$(nvm reinstall-packages 0.10.28 2>&1 > /dev/null)" @@ -15,4 +15,3 @@ ACTUAL_MSG="$(nvm reinstall-packages 0.10.28 2>&1 > /dev/null)"
EXPECTED_ERROR_CODE="2"
ACTUAL_ERROR_CODE="$(nvm reinstall-packages 0.10.28 > /dev/null 2>&1 ; echo $?)"
[ "~$ACTUAL_ERROR_CODE" = "~$EXPECTED_ERROR_CODE" ] || die "'nvm use 0.10.28 && nvm reinstall-packages 0.10.28' did not fail with the right error code: expected '$EXPECTED_ERROR_CODE', got '$ACTUAL_ERROR_CODE'"

1
test/slow/nvm reinstall-packages/setup_dir

@ -7,4 +7,3 @@ nvm install 0.10.29 @@ -7,4 +7,3 @@ nvm install 0.10.29
if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak
fi

1
test/slow/nvm reinstall-packages/teardown_dir

@ -9,4 +9,3 @@ rm -f .nvmrc @@ -9,4 +9,3 @@ rm -f .nvmrc
if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc
fi

1
test/slow/nvm run/Running "nvm run --harmony --version" should work

@ -6,4 +6,3 @@ die () { echo "$@" ; exit 1; } @@ -6,4 +6,3 @@ die () { echo "$@" ; exit 1; }
nvm run 0.10.7 --harmony --version
[ "_$(nvm run 0.10.7 --harmony --version 2>/dev/null | tail -1)" = "_v0.10.7" ] || die "\`nvm run --harmony --version\` failed to run with the correct version"

1
test/slow/nvm run/Running "nvm run 0.x" should work

@ -6,4 +6,3 @@ die () { echo "$@" ; exit 1; } @@ -6,4 +6,3 @@ die () { echo "$@" ; exit 1; }
\. ../../../nvm.sh
[ "$(nvm run 0.10.7 --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the correct version"

1
test/slow/nvm run/Running "nvm run" should pick up .nvmrc version

@ -10,4 +10,3 @@ echo "0.10.7" > .nvmrc @@ -10,4 +10,3 @@ echo "0.10.7" > .nvmrc
[ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the .nvmrc version"
[ "$(nvm run --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm run\` failed to print out the \"found in .nvmrc\" message"

1
test/slow/nvm run/setup_dir

@ -9,4 +9,3 @@ nvm install --lts @@ -9,4 +9,3 @@ nvm install --lts
if [ -f ".nvmrc" ]; then
mv .nvmrc .nvmrc.bak
fi

1
test/slow/nvm run/teardown_dir

@ -12,4 +12,3 @@ rm .nvmrc @@ -12,4 +12,3 @@ rm .nvmrc
if [ -f ".nvmrc.bak" ]; then
mv .nvmrc.bak .nvmrc
fi

1
test/slow/nvm_get_latest/nvm_get_latest

@ -119,4 +119,3 @@ EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)" @@ -119,4 +119,3 @@ EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
cleanup

1
test/slow/nvm_get_latest/nvm_get_latest failed redirect

@ -23,4 +23,3 @@ EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)" @@ -23,4 +23,3 @@ EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
|| die "failed redirect did not exit with code 2, got $EXIT_CODE"
cleanup

1
test/sourcing/Sourcing nvm.sh should use the default if available

@ -15,4 +15,3 @@ NVM_LS_CURRENT="$(nvm ls current | strip_colors | \grep -o v0.10.1)" @@ -15,4 +15,3 @@ NVM_LS_CURRENT="$(nvm ls current | strip_colors | \grep -o v0.10.1)"
NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)"
[ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.1 (-> v0.10.1)" ] \
|| die "'nvm alias default did not return 'default -> 0.10.1 (-> v0.10.1)', got '$NVM_ALIAS_DEFAULT'"

1
test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it

@ -25,4 +25,3 @@ nvm_version 0.10.2 >/dev/null 2>&1 || die "v0.10.2 not installed: $(nvm ls)" @@ -25,4 +25,3 @@ nvm_version 0.10.2 >/dev/null 2>&1 || die "v0.10.2 not installed: $(nvm ls)"
NVM_LS_CURRENT="$(nvm ls current | \grep -o v0.10.2)"
[ "_$NVM_LS_CURRENT" = '_v0.10.2' ] || die "'nvm ls current' did not return '-> v0.10.2', got '$NVM_LS_CURRENT' `nvm ls`"

1
test/sourcing/Sourcing nvm.sh with --install should install the default

@ -30,4 +30,3 @@ NVM_LS_CURRENT="$(nvm ls current | strip_colors | command grep -o v0.10.2)" @@ -30,4 +30,3 @@ NVM_LS_CURRENT="$(nvm ls current | strip_colors | command grep -o v0.10.2)"
NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)"
[ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.2 (-> v0.10.2)" ] \
|| die "'nvm alias default did not return 'default -> 0.10.2 (-> v0.10.2)', got '$NVM_ALIAS_DEFAULT'"

1
test/sourcing/Sourcing nvm.sh with --no-use should not use anything

@ -29,4 +29,3 @@ echo 'sourcing complete.' @@ -29,4 +29,3 @@ echo 'sourcing complete.'
NVM_CURRENT="$(nvm current)"
[ "_$NVM_CURRENT" = '_none' ] || [ "_$NVM_CURRENT" = '_system' ] || die "'nvm current' did not return 'none' or 'system', got '$NVM_CURRENT' `nvm ls`"

1
test/sourcing/setup

@ -11,4 +11,3 @@ rm -rf ../../v0.9.12 @@ -11,4 +11,3 @@ rm -rf ../../v0.9.12
nvm install 0.10.1 || echo >&2 'nvm install 0.10.1 failed'
nvm unalias default || 'removing default alias failed'
nvm unload || echo >&2 'nvm unload failed'

1
test/sourcing/teardown

@ -4,4 +4,3 @@ rm -rf ../../alias @@ -4,4 +4,3 @@ rm -rf ../../alias
rm -rf ../../v0.10.1
rm -rf ../../v0.10.2
rm -f ../../.nvmrc

Loading…
Cancel
Save