updating forgeapi tests and adding is false (#1548)

Co-authored-by: christopher blodgett <christopher.blodgett@gmail.com>
This commit is contained in:
chblodg
2022-06-05 13:16:12 -07:00
committed by GitHub
parent 1fb04c069c
commit 4f9de809f8
8 changed files with 46 additions and 21 deletions

View File

@@ -66,6 +66,28 @@ function isTrue() {
return ${result}
}
function isFalse() {
local oldState
oldState=$(shopt -po xtrace)
shopt -u -o xtrace
local value=${1,,}
result=
case ${value} in
false | off)
result=0
;;
*)
result=1
;;
esac
eval "$oldState"
return ${result}
}
function isDebugging() {
if isTrue "${DEBUG:-false}"; then
return 0