From 593c83b2ce0dfedf68a55a7fa400da92b0da777d Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Wed, 3 Aug 2016 10:24:46 -0500 Subject: [PATCH] Adding test and fixes from shellcheck --- diagnostic | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/diagnostic b/diagnostic index f725ead..4e6bb8a 100755 --- a/diagnostic +++ b/diagnostic @@ -83,6 +83,7 @@ echo -n "moIsArray ... " moIsArray TEST || fail "Wrongly said array was not an array" ) ( + # shellcheck disable=SC2034 TEST="" moIsArray TEST && fail "Wrongly said string was an array" ) @@ -158,6 +159,7 @@ echo -n "moStandaloneDenied ... " echo "ok" echo -n "moTest ... " +# shellcheck disable=SC2034 ( aa() { echo "hi"; } bb="bb" @@ -174,6 +176,7 @@ echo -n "moTest ... " moTest xx && fail "Erroneously flagged an empty array" moTest yy && fail "Erroneously flagged an undefined value" moTest zz && fail "Erroneously flagged an empty string" + MO_FALSE_IF_EMPTY=true moTest zz && fail "Erroneously flagged an empty value as non-false when empty should be false" ) echo "ok" @@ -212,6 +215,7 @@ echo -n "moIndentLines ... " ( CR=$'\r' LF=$'\n' + # shellcheck disable=SC2034 CRLF="$CR$LF" # CAUTION @@ -371,6 +375,7 @@ echo -n "moPartial ... " echo "ok" echo -n "moShow ... " +# shellcheck disable=SC2034 ( aa() { echo "this is aa"; } bb="BB"