nvm_print_implicit_alias errors
This file
Path
test/fast/Unit tests/nvm_print_implicit_alias errors
28 lines · 1.3 KiB
Last changed by
[Tests] add `try`/`try_err` helpers; convert tests to use themJordan Harbandbefore adoption14d01c6
History of this fileTake it
The walk stopped after 200 commits: lines older than 5c12680 point at it.
[Dev Deps] update `markdown-link-check`Jordan Harbandbefore adoption5c12680
lines 1–4why, one step back1#!/bin/sh23die () { echo "$@" ; exit 1; }4[Tests] set `$_` before sourcing `nvm.sh` in fast testsJordan Harbandbefore adoptionc451e7a
line 5why, one step back5: nvm.sh[Dev Deps] update `markdown-link-check`Jordan Harbandbefore adoption5c12680
lines 6–7why, one step back6\. ../../../nvm.sh7[Tests] add `try`/`try_err` helpers; convert tests to use themJordan Harbandbefore adoption14d01c6
lines 8–9why, one step back8\. ../../common.sh9[Dev Deps] update `markdown-link-check`Jordan Harbandbefore adoption5c12680
lines 10–15why, one step back10EXPECTED_FIRST_MSG="nvm_print_implicit_alias must be specified with local or remote as the first argument."11[ "_$(nvm_print_implicit_alias 2>&1)" = "_$EXPECTED_FIRST_MSG" ] \12 || die "nvm_print_implicit_alias did not require local|remote as first argument"13[ "_$(nvm_print_implicit_alias foo 2>&1)" = "_$EXPECTED_FIRST_MSG" ] \14 || die "nvm_print_implicit_alias did not require local|remote as first argument"15[Tests] add `try`/`try_err` helpers; convert tests to use themJordan Harbandbefore adoption14d01c6
lines 16–18why, one step back16try_err nvm_print_implicit_alias17[ "_$CAPTURED_EXIT_CODE" = "_1" ] \18 || die "nvm_print_implicit_alias without local|remote had wrong exit code: expected 1, got $CAPTURED_EXIT_CODE"[Dev Deps] update `markdown-link-check`Jordan Harbandbefore adoption5c12680
lines 19–25why, one step back1920EXPECTED_SECOND_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'node' are supported."21[ "_$(nvm_print_implicit_alias local 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \22 || die "nvm_print_implicit_alias did not require stable|unstable|iojs|node as second argument"23[ "_$(nvm_print_implicit_alias local foo 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \24 || die "nvm_print_implicit_alias did not require stable|unstable|iojs|node as second argument"25[Tests] add `try`/`try_err` helpers; convert tests to use themJordan Harbandbefore adoption14d01c6
lines 26–28why, one step back26try_err nvm_print_implicit_alias local27[ "_$CAPTURED_EXIT_CODE" = "_2" ] \28 || die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $CAPTURED_EXIT_CODE"