Browse Source

[Tests] Replace all dots with backslash dots

Qiangjun Ran 8 years ago committed by Jordan Harband
parent
commit
cadbbced20
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
  1. 2
      nvm-exec
  2. 2
      test/fast/Aliases/"nvm alias" should not accept aliases with slashes
  3. 2
      test/fast/Aliases/"nvm unalias" should not accept aliases with slashes
  4. 4
      test/fast/Aliases/Running "nvm alias <aliasname> <target>" again should change the target
  5. 2
      test/fast/Aliases/Running "nvm alias <aliasname>" should list but one alias.
  6. 4
      test/fast/Aliases/Running "nvm alias" lists implicit aliases when they do not exist
  7. 4
      test/fast/Aliases/Running "nvm alias" lists manual aliases instead of implicit aliases when present
  8. 4
      test/fast/Aliases/Running "nvm alias" should list all aliases.
  9. 4
      test/fast/Aliases/circular/nvm_resolve_alias
  10. 4
      test/fast/Aliases/circular/nvm_resolve_local_alias
  11. 4
      test/fast/Aliases/lts/"nvm alias" should ensure LTS alias dir exists
  12. 2
      test/fast/Aliases/lts/setup_dir
  13. 2
      test/fast/Aliases/lts/teardown_dir
  14. 4
      test/fast/Aliases/nvm_ensure_default_set
  15. 2
      test/fast/Aliases/nvm_resolve_alias
  16. 2
      test/fast/Aliases/nvm_resolve_local_alias
  17. 2
      test/fast/Listing paths/Running "nvm which 0.0.2" should display only version 0.0.2.
  18. 2
      test/fast/Listing paths/Running "nvm which foo" should return a nonzero exit code when not found
  19. 2
      test/fast/Listing versions/Running "nvm ls 0.0.2" should display only version 0.0.2.
  20. 2
      test/fast/Listing versions/Running "nvm ls 0.2" should display only 0.2.x versions.
  21. 2
      test/fast/Listing versions/Running "nvm ls foo" should return a nonzero exit code when not found
  22. 2
      test/fast/Listing versions/Running "nvm ls io" should return NA
  23. 2
      test/fast/Listing versions/Running "nvm ls node_" should return a nonzero exit code when not found
  24. 2
      test/fast/Listing versions/Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias
  25. 2
      test/fast/Listing versions/Running "nvm ls system" should include "system" when appropriate
  26. 2
      test/fast/Listing versions/Running "nvm ls" should display all installed versions.
  27. 2
      test/fast/Listing versions/Running "nvm ls" should filter out ".nvm"
  28. 2
      test/fast/Listing versions/Running "nvm ls" should filter out "versions"
  29. 2
      test/fast/Listing versions/Running "nvm ls" should include "system" when appropriate
  30. 2
      test/fast/Listing versions/Running "nvm ls" should list versions in the "versions" directory
  31. 2
      test/fast/Listing versions/Running "nvm ls" with node-like versioning vx.x.x should only list a matched version
  32. 2
      test/fast/Running "nvm alias" should create a file in the alias directory.
  33. 2
      test/fast/Running "nvm current" should display current nvm environment.
  34. 2
      test/fast/Running "nvm deactivate" should unset the nvm environment variables.
  35. 2
      test/fast/Running "nvm install" with "--reinstall-packages-from" requires a valid version
  36. 2
      test/fast/Running "nvm install" with an invalid version fails nicely
  37. 2
      test/fast/Running "nvm unalias" should remove the alias file.
  38. 2
      test/fast/Running "nvm unload" should unset all function and variables.
  39. 2
      test/fast/Running "nvm use foo" where "foo" is circular aborts
  40. 4
      test/fast/Running "nvm use iojs" uses latest io.js version
  41. 2
      test/fast/Running "nvm use system" should work as expected
  42. 2
      test/fast/Running "nvm use x" should create and change the "current" symlink
  43. 2
      test/fast/Running "nvm use x" should not create the "current" symlink if $NVM_SYMLINK_CURRENT is false
  44. 2
      test/fast/Sourcing nvm.sh should make the nvm command available.
  45. 2
      test/fast/Sourcing nvm.sh should not modify parameters of caller
  46. 4
      test/fast/Unit tests/iojs_version_has_solaris_binary
  47. 4
      test/fast/Unit tests/node_version_has_solaris_binary
  48. 4
      test/fast/Unit tests/nvm ls-remote
  49. 4
      test/fast/Unit tests/nvm version-remote
  50. 2
      test/fast/Unit tests/nvm_add_iojs_prefix
  51. 2
      test/fast/Unit tests/nvm_alias
  52. 2
      test/fast/Unit tests/nvm_alias_path
  53. 2
      test/fast/Unit tests/nvm_checksum
  54. 2
      test/fast/Unit tests/nvm_compare_checksum
  55. 2
      test/fast/Unit tests/nvm_compute_checksum
  56. 2
      test/fast/Unit tests/nvm_die_on_prefix
  57. 4
      test/fast/Unit tests/nvm_ensure_default_set
  58. 2
      test/fast/Unit tests/nvm_ensure_version_installed
  59. 2
      test/fast/Unit tests/nvm_ensure_version_prefix
  60. 2
      test/fast/Unit tests/nvm_find_up
  61. 2
      test/fast/Unit tests/nvm_format_version
  62. 2
      test/fast/Unit tests/nvm_get_arch
  63. 2
      test/fast/Unit tests/nvm_get_checksum
  64. 2
      test/fast/Unit tests/nvm_get_checksum_alg
  65. 2
      test/fast/Unit tests/nvm_get_latest missing curl or wget
  66. 2
      test/fast/Unit tests/nvm_get_minor_version
  67. 2
      test/fast/Unit tests/nvm_get_mirror
  68. 2
      test/fast/Unit tests/nvm_has
  69. 4
      test/fast/Unit tests/nvm_has_solaris_binary
  70. 2
      test/fast/Unit tests/nvm_has_system_iojs
  71. 2
      test/fast/Unit tests/nvm_has_system_node
  72. 2
      test/fast/Unit tests/nvm_iojs_prefix
  73. 2
      test/fast/Unit tests/nvm_is_alias
  74. 2
      test/fast/Unit tests/nvm_is_iojs_version
  75. 2
      test/fast/Unit tests/nvm_is_merged_node_version
  76. 2
      test/fast/Unit tests/nvm_is_natural_num
  77. 2
      test/fast/Unit tests/nvm_is_valid_version
  78. 2
      test/fast/Unit tests/nvm_ls_current
  79. 2
      test/fast/Unit tests/nvm_ls_remote
  80. 2
      test/fast/Unit tests/nvm_ls_remote LTS aliases
  81. 2
      test/fast/Unit tests/nvm_ls_remote_iojs
  82. 2
      test/fast/Unit tests/nvm_make_alias
  83. 2
      test/fast/Unit tests/nvm_node_prefix
  84. 2
      test/fast/Unit tests/nvm_num_version_groups
  85. 2
      test/fast/Unit tests/nvm_prepend_path
  86. 4
      test/fast/Unit tests/nvm_print_alias_path
  87. 4
      test/fast/Unit tests/nvm_print_default_alias
  88. 2
      test/fast/Unit tests/nvm_print_implicit_alias errors
  89. 2
      test/fast/Unit tests/nvm_print_implicit_alias success
  90. 2
      test/fast/Unit tests/nvm_print_npm_version
  91. 2
      test/fast/Unit tests/nvm_remote_version
  92. 2
      test/fast/Unit tests/nvm_remote_versions
  93. 2
      test/fast/Unit tests/nvm_strip_iojs_prefix
  94. 2
      test/fast/Unit tests/nvm_strip_path
  95. 2
      test/fast/Unit tests/nvm_supports_xz
  96. 2
      test/fast/Unit tests/nvm_tree_contains_path
  97. 2
      test/fast/Unit tests/nvm_validate_implicit_alias
  98. 2
      test/fast/Unit tests/nvm_version
  99. 2
      test/fast/Unit tests/nvm_version_dir
  100. 2
      test/fast/Unit tests/nvm_version_greater
  101. Some files were not shown because too many files have changed in this diff Show More

2
nvm-exec

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. "$DIR/nvm.sh" --no-use
\. "$DIR/nvm.sh" --no-use
if [ -n "$NODE_VERSION" ]; then
nvm use $NODE_VERSION > /dev/null || exit 127

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

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
die () { echo $@ ; exit 1; }

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

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
die () { echo $@ ; exit 1; }

4
test/fast/Aliases/Running "nvm alias <aliasname> <target>" again should change the target

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#!/bin/sh
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }

2
test/fast/Aliases/Running "nvm alias <aliasname>" should list but one alias.

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
[ $(nvm alias test-stable-1 | wc -l) = '2' ]

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

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#!/bin/sh
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }

4
test/fast/Aliases/Running "nvm alias" lists manual aliases instead of implicit aliases when present

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#!/bin/sh
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {

4
test/fast/Aliases/Running "nvm alias" should list all aliases.

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#!/bin/sh
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }

4
test/fast/Aliases/circular/nvm_resolve_alias

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
#!/bin/sh
. ../../../common.sh
\. ../../../common.sh
die () { echo $@ ; exit 1; }
. ../../../../nvm.sh
\. ../../../../nvm.sh
ALIAS="$(nvm_resolve_alias loopback | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias loopback was not ∞; got $ALIAS"

4
test/fast/Aliases/circular/nvm_resolve_local_alias

@ -1,9 +1,9 @@ @@ -1,9 +1,9 @@
#!/bin/sh
. ../../../common.sh
\. ../../../common.sh
die () { echo $@ ; exit 1; }
. ../../../../nvm.sh
\. ../../../../nvm.sh
ALIAS="$(nvm_resolve_local_alias loopback | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias loopback was not ∞; got $ALIAS"

4
test/fast/Aliases/lts/"nvm alias" should ensure LTS alias dir exists

@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
set -ex
. ../../../../nvm.sh
. ../../../common.sh
\. ../../../../nvm.sh
\. ../../../common.sh
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"

2
test/fast/Aliases/lts/setup_dir

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../../nvm.sh
\. ../../../../nvm.sh
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"

2
test/fast/Aliases/lts/teardown_dir

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../../nvm.sh
\. ../../../../nvm.sh
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"

4
test/fast/Aliases/nvm_ensure_default_set

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
#!/bin/sh
. ../../common.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm alias default 0.1 >/dev/null || die "'nvm alias default 0.1' failed"

2
test/fast/Aliases/nvm_resolve_alias

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
EXIT_CODE=$(nvm_resolve_alias ; echo $?)
[ $EXIT_CODE = "1" ] || die "nvm_resolve_alias without an argument did not return 1; got $EXIT_CODE"

2
test/fast/Aliases/nvm_resolve_local_alias

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
EXIT_CODE=$(nvm_resolve_local_alias ; echo $?)
[ "_$EXIT_CODE" = "_1" ] || die "nvm_resolve_local_alias without an argument did not return 1; got $EXIT_CODE"

2
test/fast/Listing paths/Running "nvm which 0.0.2" should display only version 0.0.2.

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p "${NVM_DIR}/v0.0.2"
mkdir -p "${NVM_DIR}/v0.0.20"

2
test/fast/Listing paths/Running "nvm which foo" should return a nonzero exit code when not found

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
nvm which nonexistent_version
[ "_$?" = "_1" ]

2
test/fast/Listing versions/Running "nvm ls 0.0.2" should display only version 0.0.2.

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.0.2"
mkdir "${NVM_DIR}/v0.0.20"

2
test/fast/Listing versions/Running "nvm ls 0.2" should display only 0.2.x versions.

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"

2
test/fast/Listing versions/Running "nvm ls foo" should return a nonzero exit code when not found

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
nvm ls nonexistent_version
[ "$?" = "3" ]

2
test/fast/Listing versions/Running "nvm ls io" should return NA

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
nvm ls io
[ "$?" = "3" ]

2
test/fast/Listing versions/Running "nvm ls node_" should return a nonzero exit code when not found

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
nvm ls node_
[ "$?" = "3" ]

2
test/fast/Listing versions/Running "nvm ls stable" and "nvm ls unstable" should return the appropriate implicit alias

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
die () { echo $@ ; exit 1; }

2
test/fast/Listing versions/Running "nvm ls system" should include "system" when appropriate

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p "${NVM_DIR}/v0.0.1"
mkdir -p "${NVM_DIR}/v0.0.3"

2
test/fast/Listing versions/Running "nvm ls" should display all installed versions.

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.0.1"
mkdir "${NVM_DIR}/v0.0.3"

2
test/fast/Listing versions/Running "nvm ls" should filter out ".nvm"

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"

2
test/fast/Listing versions/Running "nvm ls" should filter out "versions"

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"

2
test/fast/Listing versions/Running "nvm ls" should include "system" when appropriate

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p "${NVM_DIR}/v0.0.1"
mkdir -p "${NVM_DIR}/v0.0.3"

2
test/fast/Listing versions/Running "nvm ls" should list versions in the "versions" directory

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p "${NVM_DIR}/versions/node/v0.12.1"
mkdir "${NVM_DIR}/v0.1.3"

2
test/fast/Listing versions/Running "nvm ls" with node-like versioning vx.x.x should only list a matched version

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.2"

2
test/fast/Running "nvm alias" should create a file in the alias directory.

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
set -ex
. ../../nvm.sh
\. ../../nvm.sh
nvm alias test v0.1.2

2
test/fast/Running "nvm current" should display current nvm environment.

@ -4,7 +4,7 @@ set -ex @@ -4,7 +4,7 @@ set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
\. ../../nvm.sh
nvm deactivate 2>&1

2
test/fast/Running "nvm deactivate" should unset the nvm environment variables.

@ -8,7 +8,7 @@ die () { echo $@ ; exit 1; } @@ -8,7 +8,7 @@ die () { echo $@ ; exit 1; }
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
. ../../nvm.sh
\. ../../nvm.sh
nvm use --delete-prefix v0.2.3 || die "Failed to activate v0.2.3"
[ `expr "$PATH" : ".*v0.2.3/.*/bin"` != 0 ] || die "PATH not set up properly"

2
test/fast/Running "nvm install" with "--reinstall-packages-from" requires a valid version

@ -7,7 +7,7 @@ cleanup () { @@ -7,7 +7,7 @@ cleanup () {
rm -rf "${NVM_DIR}/v0.10.4"
}
. ../../nvm.sh
\. ../../nvm.sh
mkdir "${NVM_DIR}/v0.10.4"

2
test/fast/Running "nvm install" with an invalid version fails nicely

@ -4,7 +4,7 @@ set -ex @@ -4,7 +4,7 @@ set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
\. ../../nvm.sh
set +ex # needed for stderr
OUTPUT="$(nvm install invalid.invalid 2>&1)"

2
test/fast/Running "nvm unalias" should remove the alias file.

@ -6,7 +6,7 @@ ALIAS_PATH="../../alias" @@ -6,7 +6,7 @@ ALIAS_PATH="../../alias"
echo v0.1.2 > "${ALIAS_PATH}/test"
. ../../nvm.sh
\. ../../nvm.sh
nvm unalias test

2
test/fast/Running "nvm unload" should unset all function and variables.

@ -4,7 +4,7 @@ set -ex @@ -4,7 +4,7 @@ set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
\. ../../nvm.sh
type nvm > /dev/null 2>&1 || die "nvm not loaded"

2
test/fast/Running "nvm use foo" where "foo" is circular aborts

@ -8,7 +8,7 @@ cleanup() { @@ -8,7 +8,7 @@ cleanup() {
rm -rf "$(nvm_alias_path)/foo"
}
. ../../nvm.sh
\. ../../nvm.sh
nvm_make_alias foo foo

4
test/fast/Running "nvm use iojs" uses latest io.js version

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
set -ex
. ../common.sh
\. ../common.sh
die () { echo $@ ; cleanup ; exit 1; }
@ -13,7 +13,7 @@ cleanup() { @@ -13,7 +13,7 @@ cleanup() {
rm -rf "$(nvm_version_path "iojs-${VERSION}")"
}
. ../../nvm.sh
\. ../../nvm.sh
nvm deactivate || die "unable to deactivate; current: >$(nvm current)<"

2
test/fast/Running "nvm use system" should work as expected

@ -7,7 +7,7 @@ cleanup() { @@ -7,7 +7,7 @@ cleanup() {
}
die() { echo $@ ; cleanup ; exit 1; }
. ../../nvm.sh
\. ../../nvm.sh
nvm_has_system_node() { return 0; }
nvm_print_npm_version() { command printf ' (npm v1.2.3)'; }

2
test/fast/Running "nvm use x" should create and change the "current" symlink

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
set -ex
export NVM_SYMLINK_CURRENT=true
. ../../nvm.sh
\. ../../nvm.sh
rm -rf "${NVM_DIR}/v0.10.29"
mkdir "${NVM_DIR}/v0.10.29"

2
test/fast/Running "nvm use x" should not create the "current" symlink if $NVM_SYMLINK_CURRENT is false

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
set -ex
. ../../nvm.sh
\. ../../nvm.sh
TEST_NODE_VERSION="v0.10.29"

2
test/fast/Sourcing nvm.sh should make the nvm command available.

@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
set -ex
. ../../nvm.sh
\. ../../nvm.sh
nvm

2
test/fast/Sourcing nvm.sh should not modify parameters of caller

@ -3,5 +3,5 @@ @@ -3,5 +3,5 @@
set -ex
set -- yes
. ../../nvm.sh
\. ../../nvm.sh
[ "$1" = yes ]

4
test/fast/Unit tests/iojs_version_has_solaris_binary

@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
assert_not_ok iojs_version_has_solaris_binary ""
assert_not_ok iojs_version_has_solaris_binary "foo"

4
test/fast/Unit tests/node_version_has_solaris_binary

@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
# Invalid version numbers fail
assert_not_ok node_version_has_solaris_binary ""

4
test/fast/Unit tests/nvm ls-remote

@ -8,11 +8,11 @@ cleanup() { @@ -8,11 +8,11 @@ cleanup() {
unset -f nvm_download nvm_ls_remote nvm_ls_remote_iojs
}
. ../../../nvm.sh
\. ../../../nvm.sh
nvm deactivate 2>/dev/null || die 'unable to deactivate'
. ../../common.sh
\. ../../common.sh
REMOTE="$PWD/mocks/nvm_ls_remote.txt"
nvm_ls_remote() {

4
test/fast/Unit tests/nvm version-remote

@ -8,9 +8,9 @@ cleanup() { @@ -8,9 +8,9 @@ cleanup() {
unset -f nvm_remote_version
}
. ../../../nvm.sh
\. ../../../nvm.sh
. ../../common.sh
\. ../../common.sh
nvm_remote_version() {
echo "NVM_VERSION_ONLY:${NVM_VERSION_ONLY-},NVM_LTS:${NVM_LTS-},PATTERN:${PATTERN-}"

2
test/fast/Unit tests/nvm_add_iojs_prefix

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "_$(nvm_add_iojs_prefix 1)" = "_iojs-v1" ] || die '"nvm_add_iojs_prefix 1" did not return "iojs-v1"'
[ "_$(nvm_add_iojs_prefix iojs-1)" = "_iojs-v1" ] || die '"nvm_add_iojs_prefix iojs-1" did not return "iojs-v1"'

2
test/fast/Unit tests/nvm_alias

@ -6,7 +6,7 @@ cleanup () { @@ -6,7 +6,7 @@ cleanup () {
rm -rf ../../../alias/test
}
. ../../../nvm.sh
\. ../../../nvm.sh
OUTPUT="$(nvm_alias 2>&1)"
EXPECTED_OUTPUT='An alias is required.'

2
test/fast/Unit tests/nvm_alias_path

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

2
test/fast/Unit tests/nvm_checksum

@ -6,7 +6,7 @@ cleanup () { @@ -6,7 +6,7 @@ cleanup () {
}
die () { echo $@ ; cleanup; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p tmp
touch tmp/emptyfile

2
test/fast/Unit tests/nvm_compare_checksum

@ -5,7 +5,7 @@ cleanup () { @@ -5,7 +5,7 @@ cleanup () {
}
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
set -ex

2
test/fast/Unit tests/nvm_compute_checksum

@ -4,7 +4,7 @@ set -ex @@ -4,7 +4,7 @@ set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
set +x
OUTPUT="$(nvm_compute_checksum 2>&1 >/dev/null || echo)"

2
test/fast/Unit tests/nvm_die_on_prefix

@ -7,7 +7,7 @@ cleanup () { @@ -7,7 +7,7 @@ cleanup () {
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
OUTPUT="$(nvm_die_on_prefix 2>&1)"
EXPECTED_OUTPUT="First argument \"delete the prefix\" must be zero or one"

4
test/fast/Unit tests/nvm_ensure_default_set

@ -1,10 +1,10 @@ @@ -1,10 +1,10 @@
#!/bin/sh
. ../../common.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
EXPECTED_OUTPUT="nvm_ensure_default_set: a version is required"
OUTPUT="$(nvm_ensure_default_set 2>&1 >/dev/null)"

2
test/fast/Unit tests/nvm_ensure_version_installed

@ -5,7 +5,7 @@ cleanup () { @@ -5,7 +5,7 @@ cleanup () {
rm -rf "$(nvm_version_path v0.1.2)"
}
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p "$(nvm_version_path v0.1.2)"

2
test/fast/Unit tests/nvm_ensure_version_prefix

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "_$(nvm_ensure_version_prefix 1)" = "_v1" ] || die '"nvm_ensure_version_prefix 1" did not return "v1"'
[ "_$(nvm_ensure_version_prefix v1)" = "_v1" ] || die '"nvm_ensure_version_prefix v1" did not return "v1"'

2
test/fast/Unit tests/nvm_find_up

@ -11,7 +11,7 @@ cleanup () { @@ -11,7 +11,7 @@ cleanup () {
rm -rf tmp_nvm_find_up
}
. ../../../nvm.sh
\. ../../../nvm.sh
setup

2
test/fast/Unit tests/nvm_format_version

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
INPUT="0.1.2"
OUTPUT="$(nvm_format_version "$INPUT")"

2
test/fast/Unit tests/nvm_get_arch

@ -11,7 +11,7 @@ cleanup() { @@ -11,7 +11,7 @@ cleanup() {
die () { cleanup; echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
# Directory where mocked binaries used by nvm_get_arch for each OS/arch are
# located

2
test/fast/Unit tests/nvm_get_checksum

@ -8,7 +8,7 @@ cleanup () { @@ -8,7 +8,7 @@ cleanup () {
die () { echo $@ ; cleanup ; exit 1; }
set +e # TODO: fix
. ../../../nvm.sh
\. ../../../nvm.sh
set -e
nvm_get_mirror() {

2
test/fast/Unit tests/nvm_get_checksum_alg

@ -4,7 +4,7 @@ set -ex @@ -4,7 +4,7 @@ set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
ALG="$(nvm_get_checksum_alg)"

2
test/fast/Unit tests/nvm_get_latest missing curl or wget

@ -6,7 +6,7 @@ cleanup() { @@ -6,7 +6,7 @@ cleanup() {
unset -f nvm_has
}
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_has() { return 1 ; }

2
test/fast/Unit tests/nvm_get_minor_version

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
expect () {
INPUT="$1"

2
test/fast/Unit tests/nvm_get_mirror

@ -4,7 +4,7 @@ set -ex @@ -4,7 +4,7 @@ set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
! nvm_get_mirror || die 'unknown release type did not error'
! nvm_get_mirror node || die 'unknown release type did not error'

2
test/fast/Unit tests/nvm_has

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly'

4
test/fast/Unit tests/nvm_has_solaris_binary

@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../common.sh
\. ../../../nvm.sh
\. ../../common.sh
# Invalid version numbers fail
assert_not_ok nvm_has_solaris_binary ""

2
test/fast/Unit tests/nvm_has_system_iojs

@ -7,7 +7,7 @@ cleanup () { @@ -7,7 +7,7 @@ cleanup () {
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/versions/io.js/v0.1.2"
touch "${NVM_DIR}/versions/io.js/v0.1.2/node"

2
test/fast/Unit tests/nvm_has_system_node

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
\. ../../../nvm.sh
cleanup () {
rm -rf "${NVM_DIR}/v0.1.2/node"

2
test/fast/Unit tests/nvm_iojs_prefix

@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "$(nvm_iojs_prefix)" = "iojs" ] || die '"nvm_iojs_prefix" did not return the string "iojs". why did this fail?!'

2
test/fast/Unit tests/nvm_is_alias

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
cleanup () { unalias foo; unalias grep; }
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
alias foo='bar'
nvm_is_alias foo || die '"nvm_is_alias foo" was not true'

2
test/fast/Unit tests/nvm_is_iojs_version

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_is_iojs_version 'iojs-' || die '"nvm_is_iojs_version iojs- was not true'
nvm_is_iojs_version 'iojs-foo' || die '"nvm_is_iojs_version iojs- was not true'

2
test/fast/Unit tests/nvm_is_merged_node_version

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_is_merged_node_version '4.0' || die '"nvm_is_merged_node_version 4.0 was not true'
nvm_is_merged_node_version '5.1' || die '"nvm_is_merged_node_version 5.1 was not true'

2
test/fast/Unit tests/nvm_is_natural_num

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
! nvm_is_natural_num || die 'no args is not false'
! nvm_is_natural_num '' || die 'empty string is not false'

2
test/fast/Unit tests/nvm_is_valid_version

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_is_valid_version 0.1.2 || die "nvm_is_valid_version 0.1.2 did not return 0"
nvm_is_valid_version foo && die "nvm_is_valid_version foo did not return 1"

2
test/fast/Unit tests/nvm_ls_current

@ -6,7 +6,7 @@ TEST_DIR="$TEST_PWD/nvm_ls_current_tmp" @@ -6,7 +6,7 @@ TEST_DIR="$TEST_PWD/nvm_ls_current_tmp"
cleanup() { rm -rf "$TEST_DIR"; unset -f return_zero; alias node='node' ; unalias node; }
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
return_zero () { return 0; }

2
test/fast/Unit tests/nvm_ls_remote

@ -6,7 +6,7 @@ cleanup() { @@ -6,7 +6,7 @@ cleanup() {
unset -f nvm_download
}
. ../../../nvm.sh
\. ../../../nvm.sh
MOCKS_DIR="$PWD/mocks"

2
test/fast/Unit tests/nvm_ls_remote LTS aliases

@ -14,7 +14,7 @@ cleanup() { @@ -14,7 +14,7 @@ cleanup() {
rm -rf "$TEST_PATH"
}
. ../../../nvm.sh
\. ../../../nvm.sh
set -ex

2
test/fast/Unit tests/nvm_ls_remote_iojs

@ -6,7 +6,7 @@ cleanup() { @@ -6,7 +6,7 @@ cleanup() {
unset -f nvm_download
}
. ../../../nvm.sh
\. ../../../nvm.sh
# sample output at the time the test was written
TAB_PATH="$PWD/mocks/iojs.org-dist-index.tab"

2
test/fast/Unit tests/nvm_make_alias

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
OUTPUT="$(nvm_make_alias 2>&1)"
EXIT_CODE="$(nvm_make_alias >/dev/null 2>&1 ; echo $?)"

2
test/fast/Unit tests/nvm_node_prefix

@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "$(nvm_node_prefix)" = "node" ] || die '"nvm_node_prefix" did not return the string "node". why did this fail?!'

2
test/fast/Unit tests/nvm_num_version_groups

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "~$(nvm_num_version_groups)" = "~0" ] || die "no args should give 0"
[ "~$(nvm_num_version_groups v)" = "~0" ] || die "just "v" should give 0"

2
test/fast/Unit tests/nvm_prepend_path

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
TEST_PATH=/usr/bin:/usr/local/bin

4
test/fast/Unit tests/nvm_print_alias_path

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#!/bin/sh
. ../../common.sh
\. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; }
@ -7,7 +7,7 @@ cleanup () { @@ -7,7 +7,7 @@ cleanup () {
unset -f nvm_alias nvm_version
}
. ../../../nvm.sh
\. ../../../nvm.sh
NVM_ALIAS_DIR='path/to/the alias/dir'

4
test/fast/Unit tests/nvm_print_default_alias

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
#!/bin/sh
. ../../common.sh
\. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; }
@ -7,7 +7,7 @@ cleanup () { @@ -7,7 +7,7 @@ cleanup () {
unset -f nvm_print_implicit_alias nvm_version
}
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_print_implicit_alias() {
echo ''

2
test/fast/Unit tests/nvm_print_implicit_alias errors

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
EXPECTED_FIRST_MSG="nvm_print_implicit_alias must be specified with local or remote as the first argument."
[ "_$(nvm_print_implicit_alias 2>&1)" = "_$EXPECTED_FIRST_MSG" ] \

2
test/fast/Unit tests/nvm_print_implicit_alias success

@ -13,7 +13,7 @@ cleanup() { @@ -13,7 +13,7 @@ cleanup() {
unset -f nvm_ls_remote nvm_ls_remote_iojs
}
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.2.3"
mkdir "${NVM_DIR}/v0.3.4"

2
test/fast/Unit tests/nvm_print_npm_version

@ -7,7 +7,7 @@ cleanup () { @@ -7,7 +7,7 @@ cleanup () {
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_has() { return 1; }
OUTPUT="$(nvm_print_npm_version)"

2
test/fast/Unit tests/nvm_remote_version

@ -6,7 +6,7 @@ cleanup() { @@ -6,7 +6,7 @@ cleanup() {
unset -f nvm_ls_remote nvm_ls_remote_iojs
}
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_ls_remote() {
echo "N/A"

2
test/fast/Unit tests/nvm_remote_versions

@ -6,7 +6,7 @@ cleanup() { @@ -6,7 +6,7 @@ cleanup() {
unset -f nvm_ls_remote nvm_ls_remote_iojs
}
. ../../../nvm.sh
\. ../../../nvm.sh
OUTPUT="$(nvm_remote_versions stable 2>&1)"
EXPECTED_OUTPUT="Implicit aliases are not supported in nvm_remote_versions."

2
test/fast/Unit tests/nvm_strip_iojs_prefix

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "_$(nvm_strip_iojs_prefix iojs)" = "_" ] || die '"nvm_strip_iojs_prefix iojs" did not return an empty string'
[ "_$(nvm_strip_iojs_prefix iojs-)" = "_" ] || die '"nvm_strip_iojs_prefix iojs-" did not return an empty string'

2
test/fast/Unit tests/nvm_strip_path

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
TEST_PATH=$NVM_DIR/v0.10.5/bin:/usr/bin:$NVM_DIR/v0.11.5/bin:$NVM_DIR/v0.9.5/bin:/usr/local/bin:$NVM_DIR/v0.2.5/bin:$NVM_DIR/versions/node/v0.12.0/bin:$NVM_DIR/versions/io.js/v1.0.0/bin

2
test/fast/Unit tests/nvm_supports_xz

@ -9,7 +9,7 @@ cleanup() { @@ -9,7 +9,7 @@ cleanup() {
}
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
OLDPATH=$PATH

2
test/fast/Unit tests/nvm_tree_contains_path

@ -8,7 +8,7 @@ cleanup () { @@ -8,7 +8,7 @@ cleanup () {
}
die () { echo $@ ; cleanup; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
mkdir -p tmp
touch tmp/node

2
test/fast/Unit tests/nvm_validate_implicit_alias

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
EXPECTED_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'node' are supported."
[ "_$(nvm_validate_implicit_alias 2>&1)" = "_$EXPECTED_MSG" ] \

2
test/fast/Unit tests/nvm_version

@ -5,7 +5,7 @@ cleanup () { @@ -5,7 +5,7 @@ cleanup () {
unset -f nvm_ls_current nvm_ls
}
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_ls_current() {
echo "CURRENT!"

2
test/fast/Unit tests/nvm_version_dir

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
[ "$(nvm_version_dir)" = "$NVM_DIR/versions/node" ] || die '"nvm_version_dir" did not return new dir path'
[ "$(nvm_version_dir iojs)" = "$NVM_DIR/versions/io.js" ] || die '"nvm_version_dir iojs" did not return iojs dir path'

2
test/fast/Unit tests/nvm_version_greater

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
\. ../../../nvm.sh
nvm_version_greater 0.10.0 0.2.12 || die '"nvm_version_greater 0.10.0 0.2.12" did not return true'

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save