[Fix] ls-remote: do not match on bare LTS names, eg Argon

This commit is contained in:
Jordan Harband
2025-02-04 11:13:28 -08:00
parent 9f520c97db
commit 84bda8d402
2 changed files with 16 additions and 5 deletions

View File

@@ -83,4 +83,11 @@ EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH")"
OUTPUT="$(NVM_LTS=argon nvm_ls_remote)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "\`NVM_LTS=argon nvm_ls_remote\` did not output >$EXPECTED_OUTPUT<; got >$OUTPUT<"
OUTPUT="$(nvm_ls_remote Argon 2>&1)"
EXIT_CODE=$?
[ $EXIT_CODE -eq 3 ] || die "nvm_ls_remote Argon did not exit 3, got '${EXIT_CODE}'"
EXPECTED_OUTPUT='N/A'
[ "_${OUTPUT}" = "_${EXPECTED_OUTPUT}" ] || die "nvm_ls_remote Argon did not output expected error message; got >${OUTPUT}< expected >${EXPECTED_OUTPUT}<"
cleanup