Skip to content
Myr

Adding a failing test.

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 c49cb68 · Browse files · 1 file+33 added−4 removed
This commit

State

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

Diff stats

1 file+33 added−4 removed

  • tests:+33 added−4 removed

1 file+33 added−4 removed

modified:test/fast/Listing versions/Running "nvm ls 0.2" should display only 0.2.x versions.+33 added-4 removed
1#!/bin/sh23mkdir ../../../v0.1.34mkdir ../../../v0.2.35mkdir ../../../v0.20.367. ../../../nvm.sh89die () { echo $@ ; exit 1; }1011# The result should contain only the appropriate version numbers.9nvm ls 0.2 | grep v0.2.3 &&10nvm ls 0.1 | grep -v v0.2.3 &&11nvm ls 0.1 | grep v0.1.3 &&12nvm ls v0.2 | grep v0.2.31213nvm ls 0.1 | grep 'v0.2.3' > /dev/null14if [ $? -eq 0 ]; then15 echo '"nvm ls 0.1" contained v0.2.3'16fi1718nvm ls 0.1 | grep 'v0.20.3' > /dev/null19if [ $? -eq 0 ]; then20 die '"nvm ls 0.1" contained v0.20.3'21fi2223nvm ls 0.1 | grep 'v0.1.3' > /dev/null24if [ $? -ne 0 ]; then25 die '"nvm ls 0.1" did not contain v0.1.3'26fi2728nvm ls 0.2 | grep 'v0.2.3' > /dev/null29if [ $? -ne 0 ]; then30 die '"nvm ls 0.2" did not contain v0.2.3'31fi3233nvm ls 0.2 | grep 'v0.20.3' > /dev/null34if [ $? -eq 0 ]; then35 die '"nvm ls 0.2" contained v0.20.3'36fi3738nvm ls 0.2 | grep 'v0.2.3' > /dev/null39if [ $? -ne 0 ]; then40 die '"nvm ls 0.2" did not contain v0.2.3'41fi