[Tests] die() in tests should quote "$@" for echo

Peter Dave Hello 2016-11-07 03:34:36 +08:00 committed by Jordan Harband
parent 24f8ae5c46
commit f7763c8ba9
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
135 changed files with 135 additions and 135 deletions

View File

@ -2,7 +2,7 @@
\. ../../../nvm.sh
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
OUTPUT="$(nvm alias foo/bar baz 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."

View File

@ -2,7 +2,7 @@
\. ../../../nvm.sh
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
OUTPUT="$(nvm unalias foo/bar 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."

View File

@ -3,7 +3,7 @@
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
if [ -n "$ZSH_VERSION" ]; then
# set clobber option in order to test that this does not produce any

View File

@ -3,7 +3,7 @@
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
NVM_ALIAS_OUTPUT=$(nvm alias | strip_colors)

View File

@ -3,7 +3,7 @@
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup () {
rm -rf "$(nvm_alias_path)/stable"
rm -rf "$(nvm_alias_path)/unstable"

View File

@ -3,7 +3,7 @@
\. ../../../nvm.sh
\. ../../common.sh
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
NVM_ALIAS_OUTPUT="$(nvm alias | strip_colors)"
echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-1 -> 0.0.1 (-> v0.0.1)' \

View File

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

View File

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

View File

@ -7,7 +7,7 @@ set -ex
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
[ ! -d "${LTS_ALIAS_PATH}" ] || die "'${LTS_ALIAS_PATH}' exists and should not"

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@ mkdir -p "${NVM_DIR}/v0.0.2"
mkdir -p "${NVM_DIR}/v0.0.20"
mkdir -p "${NVM_DIR}/versions/node/v0.12.0"
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
# The result should contain only the appropriate version numbers.

View File

@ -5,7 +5,7 @@
mkdir "${NVM_DIR}/v0.0.2"
mkdir "${NVM_DIR}/v0.0.20"
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
# The result should contain only the appropriate version numbers.

View File

@ -6,7 +6,7 @@ mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"
mkdir "${NVM_DIR}/v0.20.3"
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
# The result should contain only the appropriate version numbers.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ set -ex
mkdir -p ../../v0.2.3
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2

View File

@ -2,7 +2,7 @@
set -ex
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup () {
rm -rf "${NVM_DIR}/v0.10.4"
}

View File

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

View File

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

View File

@ -2,7 +2,7 @@
set -ex
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
rm -rf "$(nvm_alias_path)/foo"

View File

@ -4,7 +4,7 @@ set -ex
\. ../common.sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
VERSION="v3.99.0"

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
set -ex
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_download nvm_ls_remote nvm_ls_remote_iojs

View File

@ -2,7 +2,7 @@
set -ex
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_remote_version

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup () {
rm -rf ../../../alias/test

View File

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

View File

@ -4,7 +4,7 @@ cleanup () {
rm tmp/emptyfile tmp/testfile
rmdir tmp
}
die () { echo $@ ; cleanup; exit 1; }
die () { echo "$@" ; cleanup; exit 1; }
\. ../../../nvm.sh

View File

@ -3,7 +3,7 @@
cleanup () {
unset -f nvm_compute_checksum
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
\. ../../../nvm.sh

View File

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

View File

@ -5,7 +5,7 @@ cleanup () {
alias npm='\npm'
unset -f nvm_has npm
}
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
\. ../../../nvm.sh

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup () {
rm -rf "$(nvm_version_path v0.1.2)"
}

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
setup() {
cleanup
mkdir -p tmp_nvm_find_up/a/b/c/d

View File

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

View File

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

View File

@ -5,7 +5,7 @@ set -ex
cleanup () {
unset -f nvm_download nvm_get_checksum_alg nvm_get_mirror
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
set +e # TODO: fix
\. ../../../nvm.sh

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_has

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@
cleanup () {
rm -rf "${NVM_DIR}/v0.1.2/node"
}
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
mkdir "${NVM_DIR}/v0.1.2"
touch "${NVM_DIR}/v0.1.2/node"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ TEST_PWD=$(pwd)
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; }
die () { echo "$@" ; cleanup ; exit 1; }
\. ../../../nvm.sh

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_download

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
TEST_PATH="$PWD/test_output"
mkdir -p "$TEST_PATH"

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_download

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
rm -rf "${NVM_DIR}/v0.2.3"
rm -rf "${NVM_DIR}/v0.3.4"

View File

@ -5,7 +5,7 @@ cleanup () {
alias npm='\npm'
unset -f nvm_has npm
}
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
\. ../../../nvm.sh

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_ls_remote nvm_ls_remote_iojs

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_ls_remote nvm_ls_remote_iojs

View File

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

View File

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

View File

@ -7,7 +7,7 @@ cleanup() {
rm -rf $TEST_PATH/{xz,which,awk,rm,command}
export PATH=$OLDPATH
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
\. ../../../nvm.sh

View File

@ -6,7 +6,7 @@ cleanup () {
rm tmp2/node
rmdir tmp2
}
die () { echo $@ ; cleanup; exit 1; }
die () { echo "$@" ; cleanup; exit 1; }
\. ../../../nvm.sh

View File

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

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
cleanup () {
unset -f nvm_ls_current nvm_ls
}

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@ cleanup () {
unset -f setup cleanup die
unset message ORIGINAL_PATH
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
NVM_ENV=testing \. ../../install.sh

View File

@ -1,6 +1,6 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
die () { echo "$@" ; exit 1; }
NVM_ENV=testing \. ../../install.sh

View File

@ -4,7 +4,7 @@ cleanup () {
unset -f die cleanup
unset install_dir
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
NVM_ENV=testing \. ../../install.sh
HOME="__home__"

View File

@ -3,7 +3,7 @@
cleanup () {
unset -f safe_type die cleanup
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
safe_type() {
type "$1"

View File

@ -4,7 +4,7 @@ cleanup () {
unset -f die cleanup
unset NVM_SOURCE out
}
die () { echo $@ ; cleanup ; exit 1; }
die () { echo "$@" ; cleanup ; exit 1; }
NVM_ENV=testing \. ../../install.sh

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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