Skip to content

Commit

Permalink
Rookie mistake from my side, forgot to clean-up the nvmrc, which caus…
Browse files Browse the repository at this point in the history
…ed other tests to fail.

Updated version color printing test because it did not pass.
  • Loading branch information
userwiths committed Jul 31, 2024
1 parent ce777fa commit 59b40b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ No NODE_VERSION provided; no .nvmrc file found";

# Skip install, we want to test the error message
diff <(echo "${EXPECTED}") <(echo "${OUTPUT}")
rm .nvmrc
8 changes: 4 additions & 4 deletions test/fast/Set Colors/nvm_print_versions calls nvm_get_colors
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\. ../../../nvm.sh

set -e
#set -e #nvm use system returns 127 and No system set message

die () {
# echo "$@" ;
Expand All @@ -24,7 +24,7 @@ fi
# default system color
nvm use system
OUTPUT=$(nvm_print_versions system)
FORMAT="\033[0;32m-> %12s\033[0m"
FORMAT="\033[0;33m%15s\033[0m"
VERSION='system'
EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")

Expand All @@ -34,7 +34,7 @@ nvm_ls_current() { echo "current";}

# default current color
OUTPUT=$(nvm_print_versions current)
FORMAT="\033[0;32m-> %12s\033[0m"
FORMAT="\033[0;32m->%13s\033[0m"
VERSION="current"
EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")

Expand All @@ -43,7 +43,7 @@ EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")
# custom current color
nvm set-colors YCMGR
OUTPUT=$(nvm_print_versions current)
FORMAT="\033[1;35m-> %12s\033[0m"
FORMAT="\033[1;35m->%13s\033[0m"
VERSION="current"
EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")

Expand Down

0 comments on commit 59b40b8

Please sign in to comment.