From 82393f5b36fa94c81c00dbcb7432a59e005ff6f8 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 4 Apr 2015 23:49:43 -0700 Subject: [PATCH] Making sure this test passes whether a system node is installed or not. --- test/fast/Unit tests/nvm_ls_current | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/fast/Unit tests/nvm_ls_current b/test/fast/Unit tests/nvm_ls_current index 1332b96..bc4a4f5 100755 --- a/test/fast/Unit tests/nvm_ls_current +++ b/test/fast/Unit tests/nvm_ls_current @@ -10,7 +10,12 @@ die () { echo $@ ; cleanup ; exit 1; } return_zero () { return 0; } -[ "$(nvm deactivate > /dev/null 2>&1 ; nvm_ls_current)" = "system" ] || die 'when deactivated, did not return "system"' +if nvm_has_system_node || nvm_has_system_iojs; then + EXPECTED_SYSTEM_NODE="system" +else + EXPECTED_SYSTEM_NODE="none" +fi +[ "_$(nvm deactivate > /dev/null 2>&1 ; nvm_ls_current)" = "_$EXPECTED_SYSTEM_NODE" ] || die "when deactivated, did not return $EXPECTED_SYSTEM_NODE" rm -rf "$TEST_DIR" mkdir "$TEST_DIR"