From 2d50606a78e15ba3c527f636ba8aa79792311ec6 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 30 Apr 2016 00:38:49 -0700 Subject: [PATCH] [Tests] flesh out `nvm_print_default_alias` tests --- test/fast/Unit tests/nvm_print_default_alias | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/fast/Unit tests/nvm_print_default_alias b/test/fast/Unit tests/nvm_print_default_alias index a2e0e55..1785756 100755 --- a/test/fast/Unit tests/nvm_print_default_alias +++ b/test/fast/Unit tests/nvm_print_default_alias @@ -13,6 +13,10 @@ nvm_print_implicit_alias() { echo '' } +OUTPUT="$(nvm_print_default_alias 2>&1)" +EXPECTED_OUTPUT='A default alias is required.' +[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_default_alias' produced wrong output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'" + OUTPUT="$(nvm_print_default_alias foo | strip_colors)" EXPECTED_OUTPUT='' [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_print_default_alias foo' should produce no output when nvm_print_implicit_alias does not; got '$OUTPUT'"