nvm_version_path
This file
Path
test/fast/Unit tests/nvm_version_path
15 lines · 701 bytes
Last changed by
[Tests] set `$_` before sourcing `nvm.sh` in fast testsJordan Harbandbefore adoptionc451e7a
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–15why, one step back6\. ../../../nvm.sh78OUTPUT="$(nvm_version_path foo)"9EXPECTED_OUTPUT="$NVM_DIR/foo"10[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_version_path foo' did not return correct location; expected '$EXPECTED_OUTPUT', got '$OUTPUT'"1112[ "$(nvm_version_path 2>&1)" = "version is required" ] || die '"nvm_version_path" did not error out'13[ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'14[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'15[ "$(nvm_version_path iojs-v0.12.0)" = "$NVM_DIR/versions/io.js/v0.12.0" ] || die 'iojs version has the wrong path'