Use real snapshot of iojs.org data for nvm_ls_remote_iojs tests.

This commit is contained in:
Jordan Harband
2015-10-17 12:05:44 -07:00
parent 114f27a075
commit 149e5d483d
2 changed files with 48 additions and 4 deletions

View File

@@ -9,10 +9,9 @@ cleanup() {
. ../../../nvm.sh
# sample output at the time the test was written
TAB_PATH="$PWD/iojs.org-dist-index.tab"
nvm_download() {
echo 'version date files npm v8 uv zlib openssl modules'
echo 'v1.0.1 2015-01-14 linux-armv7l,linux-x64,linux-x86,osx-x64-tar,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi'
echo 'v1.0.0 2015-01-14 linux-armv7l,linux-x64,linux-x86,osx-x64-tar,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi'
cat "$TAB_PATH"
}
OUTPUT="$(nvm_ls_remote_iojs foo)"
@@ -26,7 +25,10 @@ EXPECTED_OUTPUT="$(nvm_download | \egrep -o 'v[0-9]+\.[0-9]+\.[0-9]+' | sort -t.
OUTPUT="$(nvm_ls_remote_iojs 1.0)"
EXPECTED_OUTPUT="iojs-v1.0.0
iojs-v1.0.1"
iojs-v1.0.1
iojs-v1.0.2
iojs-v1.0.3
iojs-v1.0.4"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT"