Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/.nvm/test/fast/Unit tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/.nvm/test/fast/Unit tests/nvm ls-remote
#!/bin/sh

set -ex

die () { echo "$@" ; cleanup ; exit 1; }

cleanup() {
  unset -f nvm_download nvm_ls_remote nvm_ls_remote_iojs
  if [ -n TEMP_NVM_COLORS ]; then
    export NVM_COLORS=TEMP_NVM_COLORS
  fi
  unset TEMP_NVM_COLORS
}

\. ../../../nvm.sh
if [ -n ${NVM_COLORS} ]; then
  export TEMP_NVM_COLORS=NVM_COLORS
  unset NVM_COLORS
fi

nvm deactivate 2>/dev/null || die 'unable to deactivate'

\. ../../common.sh

REMOTE="$PWD/mocks/nvm_ls_remote.txt"
nvm_ls_remote() {
  cat "$REMOTE"
}
REMOTE_IOJS="$PWD/mocks/nvm_ls_remote_iojs.txt"
nvm_ls_remote_iojs() {
  cat "$REMOTE_IOJS"
}

EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote.txt"

OUTPUT="$(nvm ls-remote | sed 's/[ \t]*$//')"
EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm ls-remote did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")"

cleanup

Spamworldpro Mini