/home/techb158/.nvm/test/fast
NameSizeModeActions
Aliases/-0775rm
Listing paths/-0775rm
Listing versions/-0775rm
Set Colors/-0775rm
Unit tests/-0775rm
nvm should remove the last trailing slash in $NVM_DIR3950664editdlrm
Running 'nvm alias' should create a file in the alias directory1090775editdlrm
Running 'nvm current' should display current nvm environment2290775editdlrm
Running 'nvm deactivate' should unset the nvm environment variables9730775editdlrm
Running 'nvm install' with '--reinstall-packages-from' requires a valid version25110775editdlrm
Running 'nvm install' with an invalid version fails nicely3750775editdlrm
Running 'nvm unalias' should remove the alias file1470775editdlrm
Running 'nvm uninstall' should remove the appropriate directory1160775editdlrm
Running 'nvm uninstall' with incorrect file permissions fails nicely3200775editdlrm
Running 'nvm unload' should unset all function and variables6850775editdlrm
Running 'nvm use' should drop CR char automatically5120775editdlrm
Running 'nvm use foo' where 'foo' is circular aborts9920775editdlrm
Running 'nvm use iojs' uses latest io.js version10290775editdlrm
Running 'nvm use system' should work as expected15560775editdlrm
Running 'nvm use x' should create and change the 'current' symlink7700775editdlrm
Running 'nvm use x' should not create the 'current' symlink if $NVM_SYMLINK_CURRENT is false20250775editdlrm
setup1890775editdlrm
setup_dir1950775editdlrm
Sourcing nvm.sh should make the nvm command available410775editdlrm
Sourcing nvm.sh should not modify parameters of caller620775editdlrm
teardown1960775editdlrm
teardown_dir1570775editdlrm
Edit: /home/techb158/.nvm/test/fast/Running 'nvm use system' should work as expected (1556B)
#!/bin/sh set -eux cleanup() { unset -f nvm_has_system_node nvm_print_npm_version } die() { echo "$@" ; cleanup ; exit 1; } \. ../../nvm.sh nvm_has_system_node() { return 0; } nvm_print_npm_version() { command printf ' (npm v1.2.3)'; } EXPECTED_OUTPUT="Now using system version of node: $(node -v)$(nvm_print_npm_version)" set +x # since stderr is needed OUTPUT="$(nvm use system 2>&1)" set -x [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Could not use system version of node. Got >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<" EXPECTED_OUTPUT="" set +x # since stderr is needed OUTPUT="$(nvm use --silent system 2>&1 | tail -1)" set -x [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Could not use system version of node or --silent was not silent" nvm_has_system_node() { return 1; } nvm_print_npm_version() { command printf ''; } EXPECTED_OUTPUT="System version of node not found." set +x # since stderr is needed OUTPUT="$(nvm use system 2>&1 | tail -1)" set -x [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Did not report error, system node not found" nvm use system 2>&1 > /dev/null || [ $? -eq 127 ] || die "Did not return error code, system node not found" EXPECTED_OUTPUT="" set +x # since stderr is needed OUTPUT="$(nvm use --silent system 2>&1 | tail -1)" set -x [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Did not report error, system node not found or --silent was not silent" nvm use --silent system 2>&1 > /dev/null || [ $? -eq 127 ] || die "Did not return error code, system node not found or --silent was not silent" cleanup