Skip to content
Myr

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

60 files+0 added−63 removed

modified:test/fast/Aliases/circular/setup-1 removed
5 unmodified lines
6echo three > ../../../../alias/two7echo one > ../../../../alias/three89echo two > ../../../../alias/four10
modified:test/fast/Aliases/circular/teardown-1 removed
5 unmodified lines
6rm -f ../../../../alias/two7rm -f ../../../../alias/three89rm -f ../../../../alias/four10
modified:test/fast/Aliases/"nvm alias" should not accept aliases with slashes-1 removed
22 unmodified lines
23[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to create an alias starting with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"2425EXIT_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 lines
23[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove an alias starting with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"2425EXIT_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 lines
23EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)"24IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")"25echo "$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 lines
13rmdir ../../../versions >/dev/null 2>&114unalias nvm_has_system_node >/dev/null 2>&115rm -f ../../../alias/stable >/dev/null 2>&116rm -f ../../../alias/unstable >/dev/null 2>&117
modified:test/fast/Unit tests/nvm_alias-1 removed
28 unmodified lines
29OUTPUT="$(nvm_alias test)"30[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias test' produced wrong output; got $OUTPUT"3132cleanup33
modified:test/fast/Unit tests/nvm_alias_path-1 removed
3 unmodified lines
45\. ../../../nvm.sh67[ "_$(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 lines
22[ "~$(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"2425cleanup26
modified:test/fast/Unit tests/nvm_format_version-1 removed
16 unmodified lines
17INPUT="1.2.3.4.5"18OUTPUT="$(nvm_format_version "$INPUT")"19EXPECTED_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 lines
89[ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"1011! 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 lines
3435[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT"3637cleanup38
modified:test/fast/Unit tests/nvm_num_version_groups-1 removed
20 unmodified lines
2122[ "~$(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 lines
2223SECOND_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 lines
74 || 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"7677cleanup78
modified:test/fast/Unit tests/nvm_tree_contains_path-1 removed
27 unmodified lines
2829nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'3031cleanup32
modified:test/fast/Unit tests/nvm_validate_implicit_alias-1 removed
16 unmodified lines
17nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable did not exit 0"18nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0"19nvm_validate_implicit_alias node || die "nvm_validate_implicit_alias node did not exit 0"20nvm_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 lines
8[ "$(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 lines
1213if nvm_version_greater 0.10.0 0.10.0; then14 die '"nvm_version_greater" returned false for the same two versions'15fi16
modified:test/fast/Unit tests/nvm_version_path-1 removed
10 unmodified lines
11[ "$(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 lines
5NVM_ENV=testing \. ../../install.sh67#nvm_do_install is available8type 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 lines
21install_dir=$(nvm_install_dir)22[ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"2324cleanup25
modified:test/install_script/nvm_install_with_aliased_dot-1 removed
18 unmodified lines
19nvm_do_install > /dev/null 2>&120command -v nvm || die 'nvm could not be loaded'2122cleanup23
modified:test/install_script/nvm_reset-1 removed
34 unmodified lines
35! safe_type nvm_reset || die 'nvm_reset is still available'36! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'3738cleanup39
modified:test/install_script/nvm_source-1 removed
35 unmodified lines
36out=$(nvm_source "anything")37[ "_$out" = "_my_location" ] || die "nvm_source script should have returned \$NVM_SOURCE. Got \"$out\""3839cleanup40
modified:test/installation_iojs/setup_dir-1 removed
1 unmodified line
23if [ -f ".nvmrc" ]; then4 mv .nvmrc .nvmrc.bak5fi6
modified:test/installation_iojs/teardown_dir-1 removed
12 unmodified lines
1314if [ -f ".nvmrc.bak" ]; then15 mv .nvmrc.bak .nvmrc16fi17
modified:test/installation_node/install from source implicitly-1 removed
19 unmodified lines
2021# Check22[ -d ../../$NVM_TEST_VERSION ]23nvm 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 lines
36${USE_OUTPUT}37failed"3839[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"4041
modified:test/installation_node/install version specified in .nvmrc from binary-2 removed
16 unmodified lines
17# Check18[ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"19nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \20 || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"2122
modified:test/installation_node/install version specified in .nvmrc from source-2 removed
16 unmodified lines
17# Check18[ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"19nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \20 || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"2122
modified:test/installation_node/setup_dir-1 removed
1 unmodified line
23if [ -f ".nvmrc" ]; then4 mv .nvmrc .nvmrc.bak5fi6
modified:test/installation_node/teardown_dir-1 removed
10 unmodified lines
1112if [ -f ".nvmrc.bak" ]; then13 mv .nvmrc.bak .nvmrc14fi15
modified:test/slow/nvm exec/Preamble works and respects "silent" flag-1 removed
26 unmodified lines
2728OUTPUT="$(nvm exec --silent 1 npm --version | head -1)"29EXPECTED_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 lines
1314[ "$(nvm exec npm --version | tail -1)" = "$NPM_VERSION_TEN" ] || die "\`nvm exec\` failed to run with the .nvmrc version"1516[ "$(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 lines
78if [ -f ".nvmrc" ]; then9 mv .nvmrc .nvmrc.bak10fi11
modified:test/slow/nvm exec/teardown_dir-1 removed
9 unmodified lines
1011if [ -f ".nvmrc.bak" ]; then12 mv .nvmrc.bak .nvmrc13fi14
modified:test/slow/nvm reinstall-packages/Running "nvm copy-packages $(nvm ls current)" should error out-1 removed
13 unmodified lines
1415EXPECTED_ERROR_CODE="2"16ACTUAL_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 lines
67if [ -f ".nvmrc" ]; then8 mv .nvmrc .nvmrc.bak9fi10
modified:test/slow/nvm reinstall-packages/teardown_dir-1 removed
7 unmodified lines
89if [ -f ".nvmrc.bak" ]; then10 mv .nvmrc.bak .nvmrc11fi12
modified:test/slow/nvm run/Running "nvm run --harmony --version" should work-1 removed
4 unmodified lines
5\. ../../../nvm.sh67nvm 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 lines
56\. ../../../nvm.sh78[ "$(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 lines
910[ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the .nvmrc version"1112[ "$(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 lines
89if [ -f ".nvmrc" ]; then10 mv .nvmrc .nvmrc.bak11fi12
modified:test/slow/nvm run/teardown_dir-1 removed
10 unmodified lines
1112if [ -f ".nvmrc.bak" ]; then13 mv .nvmrc.bak .nvmrc14fi15
modified:test/slow/nvm_get_latest/nvm_get_latest-1 removed
117 unmodified lines
118 || die "success path did not exit with code 0, got $EXIT_CODE"119120121cleanup122
modified:test/slow/nvm_get_latest/nvm_get_latest failed redirect-1 removed
21 unmodified lines
22[ "_$EXIT_CODE" = "_2" ] \23 || die "failed redirect did not exit with code 2, got $EXIT_CODE"2425cleanup26
modified:test/slow/node 0.6.21 should install 0.6.21-pre-1 removed
7 unmodified lines
89nvm 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 lines
10\. ../../nvm.sh11nvm install 0.10.1 || echo >&2 'nvm install 0.10.1 failed'12nvm unalias default || 'removing default alias failed'13nvm unload || echo >&2 'nvm unload failed'14
modified:test/sourcing/Sourcing nvm.sh should use the default if available-1 removed
13 unmodified lines
1415NVM_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 lines
24[ "_$EXIT_CODE" = "_0" ] || die "sourcing returned nonzero exit code: $EXIT_CODE"2526NVM_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 lines
2930NVM_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 lines
28[ "_$EXIT_CODE" = "_0" ] || die "sourcing returned nonzero exit code: $EXIT_CODE"2930NVM_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 lines
3rm -rf ../../alias4rm -rf ../../v0.10.15rm -rf ../../v0.10.26rm -f ../../.nvmrc7
modified:.dockerignore-1 removed
12 unmodified lines
13npm-debug.log1415.DS_Store16current17
modified:.gitattributes-1 removed
1* eol=lf2
modified:bash_completion-1 removed
93 unmodified lines
94 autoload -U +X bashcompinit && bashcompinit95fi9697complete -o default -F __nvm nvm98
modified:CONTRIBUTING.md-1 removed
15 unmodified lines
1617Even 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.1819Thanks again!20
modified:Dockerfile-1 removed
104 unmodified lines
105# Set WORKDIR to nvm directory106WORKDIR /home/nvm/.nvm107108ENTRYPOINT /bin/bash109
modified:LICENSE.md-1 removed
16 unmodified lines
17FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR18COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER19IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.21