From 81248bca384cb4f15f48324d3942d886b0ce0ea2 Mon Sep 17 00:00:00 2001 From: "Bickel, Korbin" Date: Thu, 13 Dec 2018 15:45:43 -0500 Subject: [PATCH] Add test cases for optional version parameter positioning. --- ...rrying optional version parameter position | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/installation_node/install with varrying optional version parameter position diff --git a/test/installation_node/install with varrying optional version parameter position b/test/installation_node/install with varrying optional version parameter position new file mode 100644 index 0000000..ca6faa8 --- /dev/null +++ b/test/installation_node/install with varrying optional version parameter position @@ -0,0 +1,22 @@ +#!/bin/sh + +die () { echo "$@" ; exit 1; } + +\. ../../nvm.sh + +NVM_TEST_VERSION=v0.10.7 + +# Remove the stuff we're clobbering. +remove_install () { [ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION } + +# Install with version param first +remove_install +nvm install $NVM_TEST_VERSION --no-progress || die "install $NVM_TEST_VERSION failed with version param as first parameter" + +# Install with version param last +remove_install +nvm install --no-progress $NVM_TEST_VERSION || die "install $NVM_TEST_VERSION failed with version param as last parameter" + +# Install with version param between config parameters +remove_install +nvm install --skip-default-packages $NVM_TEST_VERSION --no-progress || die "install $NVM_TEST_VERSION failed with version param between config parameters"