Skip to content
Myr

[Tests] `nvm ls`: ensure `nvm alias` is called

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 58d0933 · Browse files · 2 files+38 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+38 added−0 removed

  • tests:+35 added−0 removed
  • other:+3 added−0 removed

2 files+38 added−0 removed

added:test/fast/Listing versions/Running "nvm ls" calls into nvm_alias+35 added
1#!/bin/sh23\. ../../../nvm.sh4\. ../../common.sh56die () { echo "$@" ; unset -f nvm_ls nvm_list_aliases; exit 1; }78make_fake_node v0.12.87 || die 'fake v0.12.87 could not be made'9make_fake_node v0.12.9 || die 'fake v0.12.9 could not be made'10make_fake_iojs v0.1.2 || die 'fake iojs-v0.1.2 could not be made'11make_fake_iojs v0.10.2 || die 'fake iojs-v0.10.2 could not be made'1213set -e1415nvm_list_aliases() {16 echo 'sd-6'17}18# sanity check19OUTPUT="$(nvm alias)"20EXPECTED_OUTPUT='sd-6'21[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "1: expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"2223nvm_ls() {24 echo v0.12.8725 echo v0.12.926 echo iojs-v0.1.227 echo iojs-v0.10.228}29OUTPUT="$(nvm ls --no-colors)"30EXPECTED_OUTPUT=" v0.12.87 *31 v0.12.9 *32 iojs-v0.1.2 *33 iojs-v0.10.2 *34sd-6"35[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "2: expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
modified:.editorconfig+3 added
10 unmodified lines
1112[*.txt]13indent_size = false1415[test/fast/Listing versions/Running "nvm ls" calls into nvm_alias]16indent_size = false1718[Makefile]19indent_style = tab