mirror of
https://github.com/tests-always-included/mo.git
synced 2024-12-21 17:27:47 +00:00
Adding test and fixes from shellcheck
This commit is contained in:
parent
c6bbf89f84
commit
593c83b2ce
@ -83,6 +83,7 @@ echo -n "moIsArray ... "
|
|||||||
moIsArray TEST || fail "Wrongly said array was not an array"
|
moIsArray TEST || fail "Wrongly said array was not an array"
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
|
# shellcheck disable=SC2034
|
||||||
TEST=""
|
TEST=""
|
||||||
moIsArray TEST && fail "Wrongly said string was an array"
|
moIsArray TEST && fail "Wrongly said string was an array"
|
||||||
)
|
)
|
||||||
@ -158,6 +159,7 @@ echo -n "moStandaloneDenied ... "
|
|||||||
echo "ok"
|
echo "ok"
|
||||||
|
|
||||||
echo -n "moTest ... "
|
echo -n "moTest ... "
|
||||||
|
# shellcheck disable=SC2034
|
||||||
(
|
(
|
||||||
aa() { echo "hi"; }
|
aa() { echo "hi"; }
|
||||||
bb="bb"
|
bb="bb"
|
||||||
@ -174,6 +176,7 @@ echo -n "moTest ... "
|
|||||||
moTest xx && fail "Erroneously flagged an empty array"
|
moTest xx && fail "Erroneously flagged an empty array"
|
||||||
moTest yy && fail "Erroneously flagged an undefined value"
|
moTest yy && fail "Erroneously flagged an undefined value"
|
||||||
moTest zz && fail "Erroneously flagged an empty string"
|
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"
|
echo "ok"
|
||||||
|
|
||||||
@ -212,6 +215,7 @@ echo -n "moIndentLines ... "
|
|||||||
(
|
(
|
||||||
CR=$'\r'
|
CR=$'\r'
|
||||||
LF=$'\n'
|
LF=$'\n'
|
||||||
|
# shellcheck disable=SC2034
|
||||||
CRLF="$CR$LF"
|
CRLF="$CR$LF"
|
||||||
|
|
||||||
# CAUTION
|
# CAUTION
|
||||||
@ -371,6 +375,7 @@ echo -n "moPartial ... "
|
|||||||
echo "ok"
|
echo "ok"
|
||||||
|
|
||||||
echo -n "moShow ... "
|
echo -n "moShow ... "
|
||||||
|
# shellcheck disable=SC2034
|
||||||
(
|
(
|
||||||
aa() { echo "this is aa"; }
|
aa() { echo "this is aa"; }
|
||||||
bb="BB"
|
bb="BB"
|
||||||
|
Loading…
Reference in New Issue
Block a user