Remove useless trailing newlines
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Peter Dave Hello · committed by Peter Dave Hello · parent f3076d1 · Browse files · 60 files·+0 added−63 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
60 files+0 added−63 removed
- tests:+0 added−57 removed
- other:+0 added−6 removed
Provenance
- Commit
2cd2c0f- Tree
176374a- Author
Peter Dave Hello <hsu@peterdavehello.org>- Committer
Peter Dave Hello <hsu@peterdavehello.org>- Parent
f3076d1
60 files changed+0 added−63 removed
modified:test/fast/Aliases/circular/setup-1 removed
5 unmodified lines6 echo three > ../../../../alias/two7 echo one > ../../../../alias/three8 9 echo two > ../../../../alias/four10-modified:test/fast/Aliases/circular/teardown-1 removed
5 unmodified lines6 rm -f ../../../../alias/two7 rm -f ../../../../alias/three8 9 rm -f ../../../../alias/four10-modified:test/fast/Aliases/"nvm alias" should not accept aliases with slashes-1 removed
22 unmodified lines23 [ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to create an alias starting with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"24 25 EXIT_CODE="$(nvm alias /bar baz >/dev/null 2>&1 ; echo $?)"26 [ "$EXIT_CODE" = "1" ] || die "trying to create an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"27-modified:test/fast/Aliases/"nvm unalias" should not accept aliases with slashes-1 removed
22 unmodified lines23 [ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove an alias starting with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"24 25 EXIT_CODE="$(nvm unalias /bar >/dev/null 2>&1 ; echo $?)"26 [ "$EXIT_CODE" = "1" ] || die "trying to remove an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"27-modified:test/fast/Aliases/Running "nvm alias" lists implicit aliases when they do not exist-1 removed
22 unmodified lines23 EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)"24 IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")"25 echo "$NVM_ALIAS_OUTPUT" | \grep -F "iojs -> $EXPECTED_IOJS (-> $IOJS_VERSION) (default)" \26 || die "nvm alias did not contain the default local iojs version; got '$NVM_ALIAS_OUTPUT'"27-modified:test/fast/Listing versions/teardown-1 removed
12 unmodified lines13 rmdir ../../../versions >/dev/null 2>&114 unalias nvm_has_system_node >/dev/null 2>&115 rm -f ../../../alias/stable >/dev/null 2>&116 rm -f ../../../alias/unstable >/dev/null 2>&117-modified:test/fast/Unit tests/nvm_alias-1 removed
28 unmodified lines29 OUTPUT="$(nvm_alias test)"30 [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias test' produced wrong output; got $OUTPUT"31 32 cleanup33-modified:test/fast/Unit tests/nvm_alias_path-1 removed
3 unmodified lines4 5 \. ../../../nvm.sh6 7 [ "_$(nvm_alias_path)" = "_$NVM_DIR/alias" ] || die "nvm_alias_path did not requrn correct location"8-modified:test/fast/Unit tests/nvm_find_up-1 removed
21 unmodified lines22 [ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b/c nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up/a/b/c" ] || die "failed to find in current dir"23 [ "~$(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"24 25 cleanup26-modified:test/fast/Unit tests/nvm_format_version-1 removed
16 unmodified lines17 INPUT="1.2.3.4.5"18 OUTPUT="$(nvm_format_version "$INPUT")"19 EXPECTED_OUTPUT="v1.2.3"20 [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"21-modified:test/fast/Unit tests/nvm_has-1 removed
7 unmodified lines8 9 [ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"10 11 ! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found"12-modified:test/fast/Unit tests/nvm_ls_remote_iojs-1 removed
33 unmodified lines34 35 [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT"36 37 cleanup38-modified:test/fast/Unit tests/nvm_num_version_groups-1 removed
20 unmodified lines21 22 [ "~$(nvm_num_version_groups 1.2.3)" = "~3" ] || die "1.2.3 should give 3"23 [ "~$(nvm_num_version_groups v1.2.3)" = "~3" ] || die "v1.2.3 should give 3"24 [ "~$(nvm_num_version_groups v1.2.3.)" = "~3" ] || die "v1.2.3. should give 3"25-modified:test/fast/Unit tests/nvm_print_implicit_alias errors-1 removed
21 unmodified lines22 23 SECOND_EXIT_CODE="$(nvm_print_implicit_alias local > /dev/null 2>&1 ; echo $?)"24 [ "_$SECOND_EXIT_CODE" = "_2" ] \25 || die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $SECOND_EXIT_CODE"26-modified:test/fast/Unit tests/nvm_remote_versions-1 removed
73 unmodified lines74 || die "nvm_remote_versions iojs did not return contents of nvm_ls_remote_iojs; got $OUTPUT"75 [ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions iojs did not exit with 0, got $EXIT_CODE"76 77 cleanup78-modified:test/fast/Unit tests/nvm_tree_contains_path-1 removed
27 unmodified lines28 29 nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'30 31 cleanup32-modified:test/fast/Unit tests/nvm_validate_implicit_alias-1 removed
16 unmodified lines17 nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable did not exit 0"18 nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0"19 nvm_validate_implicit_alias node || die "nvm_validate_implicit_alias node did not exit 0"20 nvm_validate_implicit_alias iojs || die "nvm_validate_implicit_alias iojs did not exit 0"21-modified:test/fast/Unit tests/nvm_version_dir-1 removed
7 unmodified lines8 [ "$(nvm_version_dir iojs)" = "$NVM_DIR/versions/io.js" ] || die '"nvm_version_dir iojs" did not return iojs dir path'9 [ "$(nvm_version_dir new)" = "$(nvm_version_dir)" ] || die '"nvm_version_dir new" did not return new dir path'10 [ "$(nvm_version_dir old)" = "$NVM_DIR" ] || die '"nvm_version_dir old" did not return old dir path'11 [ "$(nvm_version_dir foo 2>&1)" = "unknown version dir" ] || die '"nvm_version_dir foo" did not error out'12-modified:test/fast/Unit tests/nvm_version_greater-1 removed
11 unmodified lines12 13 if nvm_version_greater 0.10.0 0.10.0; then14 die '"nvm_version_greater" returned false for the same two versions'15 fi16-modified:test/fast/Unit tests/nvm_version_path-1 removed
10 unmodified lines11 [ "$(nvm_version_path 2>&1)" = "version is required" ] || die '"nvm_version_path" did not error out'12 [ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'13 [ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'14 [ "$(nvm_version_path iojs-v0.12.0)" = "$NVM_DIR/versions/io.js/v0.12.0" ] || die 'iojs version has the wrong path'15-modified:test/install_script/nvm_do_install-1 removed
4 unmodified lines5 NVM_ENV=testing \. ../../install.sh6 7 #nvm_do_install is available8 type nvm_do_install > /dev/null 2>&1 || die 'nvm_do_install is not available'9-modified:test/install_script/nvm_install_dir-1 removed
20 unmodified lines21 install_dir=$(nvm_install_dir)22 [ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"23 24 cleanup25-modified:test/install_script/nvm_install_with_aliased_dot-1 removed
18 unmodified lines19 nvm_do_install > /dev/null 2>&120 command -v nvm || die 'nvm could not be loaded'21 22 cleanup23-modified:test/install_script/nvm_reset-1 removed
34 unmodified lines35 ! safe_type nvm_reset || die 'nvm_reset is still available'36 ! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'37 38 cleanup39-modified:test/install_script/nvm_source-1 removed
35 unmodified lines36 out=$(nvm_source "anything")37 [ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""38 39 cleanup40-modified:test/installation_iojs/setup_dir-1 removed
1 unmodified line2 3 if [ -f ".nvmrc" ]; then4 mv .nvmrc .nvmrc.bak5 fi6-modified:test/installation_iojs/teardown_dir-1 removed
12 unmodified lines13 14 if [ -f ".nvmrc.bak" ]; then15 mv .nvmrc.bak .nvmrc16 fi17-modified:test/installation_node/install from source implicitly-1 removed
19 unmodified lines20 21 # Check22 [ -d ../../$NVM_TEST_VERSION ]23 nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"24-modified:test/installation_node/install hook-2 removed
35 unmodified lines36 ${USE_OUTPUT}37 failed"38 39 [ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"40-41-modified:test/installation_node/install version specified in .nvmrc from binary-2 removed
16 unmodified lines17 # Check18 [ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"19 nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \20 || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"21-22-modified:test/installation_node/install version specified in .nvmrc from source-2 removed
16 unmodified lines17 # Check18 [ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"19 nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \20 || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"21-22-modified:test/installation_node/setup_dir-1 removed
1 unmodified line2 3 if [ -f ".nvmrc" ]; then4 mv .nvmrc .nvmrc.bak5 fi6-modified:test/installation_node/teardown_dir-1 removed
10 unmodified lines11 12 if [ -f ".nvmrc.bak" ]; then13 mv .nvmrc.bak .nvmrc14 fi15-modified:test/slow/nvm exec/Preamble works and respects "silent" flag-1 removed
26 unmodified lines27 28 OUTPUT="$(nvm exec --silent 1 npm --version | head -1)"29 EXPECTED_OUTPUT="${NPM_VERSION_ONE}"30 [ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "\`nvm exec --silent\` failed to suppress io.js preamble; expected '$EXPECTED_OUTPUT', got '$OUTPUT'"31-modified:test/slow/nvm exec/Running "nvm exec" should pick up .nvmrc version-1 removed
12 unmodified lines13 14 [ "$(nvm exec npm --version | tail -1)" = "$NPM_VERSION_TEN" ] || die "\`nvm exec\` failed to run with the .nvmrc version"15 16 [ "$(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"17-modified:test/slow/nvm exec/setup_dir-1 removed
6 unmodified lines7 8 if [ -f ".nvmrc" ]; then9 mv .nvmrc .nvmrc.bak10 fi11-modified:test/slow/nvm exec/teardown_dir-1 removed
9 unmodified lines10 11 if [ -f ".nvmrc.bak" ]; then12 mv .nvmrc.bak .nvmrc13 fi14-modified:test/slow/nvm reinstall-packages/Running "nvm copy-packages $(nvm ls current)" should error out-1 removed
13 unmodified lines14 15 EXPECTED_ERROR_CODE="2"16 ACTUAL_ERROR_CODE="$(nvm reinstall-packages 0.10.28 > /dev/null 2>&1 ; echo $?)"17 [ "~$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'"18-modified:test/slow/nvm reinstall-packages/setup_dir-1 removed
5 unmodified lines6 7 if [ -f ".nvmrc" ]; then8 mv .nvmrc .nvmrc.bak9 fi10-modified:test/slow/nvm reinstall-packages/teardown_dir-1 removed
7 unmodified lines8 9 if [ -f ".nvmrc.bak" ]; then10 mv .nvmrc.bak .nvmrc11 fi12-modified:test/slow/nvm run/Running "nvm run --harmony --version" should work-1 removed
4 unmodified lines5 \. ../../../nvm.sh6 7 nvm run 0.10.7 --harmony --version8 [ "_$(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"9-modified:test/slow/nvm run/Running "nvm run 0.x" should work-1 removed
4 unmodified lines5 6 \. ../../../nvm.sh7 8 [ "$(nvm run 0.10.7 --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the correct version"9-modified:test/slow/nvm run/Running "nvm run" should pick up .nvmrc version-1 removed
8 unmodified lines9 10 [ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the .nvmrc version"11 12 [ "$(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"13-modified:test/slow/nvm run/setup_dir-1 removed
7 unmodified lines8 9 if [ -f ".nvmrc" ]; then10 mv .nvmrc .nvmrc.bak11 fi12-modified:test/slow/nvm run/teardown_dir-1 removed
10 unmodified lines11 12 if [ -f ".nvmrc.bak" ]; then13 mv .nvmrc.bak .nvmrc14 fi15-modified:test/slow/nvm_get_latest/nvm_get_latest-1 removed
117 unmodified lines118 || die "success path did not exit with code 0, got $EXIT_CODE"119 120 121 cleanup122-modified:test/slow/nvm_get_latest/nvm_get_latest failed redirect-1 removed
21 unmodified lines22 [ "_$EXIT_CODE" = "_2" ] \23 || die "failed redirect did not exit with code 2, got $EXIT_CODE"24 25 cleanup26-modified:test/slow/node 0.6.21 should install 0.6.21-pre-1 removed
7 unmodified lines8 9 nvm install 0.6.21 || die 'v0.6.21 installation failed'10 [ "_$(node -v)" = "_v0.6.21-pre" ] || die "v0.6.21-pre not installed with v0.6.21, got $(node -v)"11 [ "_$(nvm current)" = "_v0.6.21" ] || die "v0.6.21-pre not reported as v0.6.21, got $(nvm current)"12-modified:test/sourcing/setup-1 removed
9 unmodified lines10 \. ../../nvm.sh11 nvm install 0.10.1 || echo >&2 'nvm install 0.10.1 failed'12 nvm unalias default || 'removing default alias failed'13 nvm unload || echo >&2 'nvm unload failed'14-modified:test/sourcing/Sourcing nvm.sh should use the default if available-1 removed
13 unmodified lines14 15 NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)"16 [ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.1 (-> v0.10.1)" ] \17 || die "'nvm alias default did not return 'default -> 0.10.1 (-> v0.10.1)', got '$NVM_ALIAS_DEFAULT'"18-modified:test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it-1 removed
23 unmodified lines24 [ "_$EXIT_CODE" = "_0" ] || die "sourcing returned nonzero exit code: $EXIT_CODE"25 26 NVM_LS_CURRENT="$(nvm ls current | \grep -o v0.10.2)"27 [ "_$NVM_LS_CURRENT" = '_v0.10.2' ] || die "'nvm ls current' did not return '-> v0.10.2', got '$NVM_LS_CURRENT' `nvm ls`"28-modified:test/sourcing/Sourcing nvm.sh with --install should install the default-1 removed
28 unmodified lines29 30 NVM_ALIAS_DEFAULT="$(nvm alias default | strip_colors)"31 [ "_$NVM_ALIAS_DEFAULT" = "_default -> 0.10.2 (-> v0.10.2)" ] \32 || die "'nvm alias default did not return 'default -> 0.10.2 (-> v0.10.2)', got '$NVM_ALIAS_DEFAULT'"33-modified:test/sourcing/Sourcing nvm.sh with --no-use should not use anything-1 removed
27 unmodified lines28 [ "_$EXIT_CODE" = "_0" ] || die "sourcing returned nonzero exit code: $EXIT_CODE"29 30 NVM_CURRENT="$(nvm current)"31 [ "_$NVM_CURRENT" = '_none' ] || [ "_$NVM_CURRENT" = '_system' ] || die "'nvm current' did not return 'none' or 'system', got '$NVM_CURRENT' `nvm ls`"32-modified:test/sourcing/teardown-1 removed
2 unmodified lines3 rm -rf ../../alias4 rm -rf ../../v0.10.15 rm -rf ../../v0.10.26 rm -f ../../.nvmrc7-modified:.dockerignore-1 removed
12 unmodified lines13 npm-debug.log14 15 .DS_Store16 current17-modified:.gitattributes-1 removed
1 * eol=lf2-modified:bash_completion-1 removed
93 unmodified lines94 autoload -U +X bashcompinit && bashcompinit95 fi96 97 complete -o default -F __nvm nvm98-modified:CONTRIBUTING.md-1 removed
15 unmodified lines16 17 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.18 19 Thanks again!20-modified:Dockerfile-1 removed
104 unmodified lines105 # Set WORKDIR to nvm directory106 WORKDIR /home/nvm/.nvm107 108 ENTRYPOINT /bin/bash109-modified:LICENSE.md-1 removed
16 unmodified lines17 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR18 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER19 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.21-