diff --git a/Bash/header b/Bash/header index 601888c..75c66d9 100644 --- a/Bash/header +++ b/Bash/header @@ -90,27 +90,30 @@ function decrementdate() { ## QA Functions ## # This is for QA to test sanitizing input +if [ -z "$qapadding" ]; then qapadding=40; fi function qaunittest { - if [ -z "$1" ] || [ -z "$2" ]; then - echo Usage: qaunittest function input expectedreturn inputarguments - exit + unset actualreturn; + if [ -z "$1" ]; then + echo Usage: qaunittest title function expectedreturn input inputarguments + exit 1 fi - function="$1" - userinput="$2" + header="$1" + function="$2" expectedreturn="$3" - fnargs="$4" - input="input""$inputcount" - cmd="$(printf "source /usr/local/src/SharedLibraries/Bash/header;%s '%s' '%s' %s >/dev/null;echo \$%s" "$function" "$input" "Input" "$fnargs" "$input")" - $input="$(bash -c "$cmd" <&1 <