option to always show body of response added

This commit is contained in:
shockrah 2020-07-28 22:45:52 -07:00
parent b5041a4f8d
commit b6db34f28f

View File

@ -10,6 +10,7 @@
# 1. is properly formatted
# 2. has all the info we need & none we don't
# 3. has basically nothing malicious about it
log_result() {
name=$1
expect=$2
@ -26,9 +27,18 @@ log_result() {
echo -e ${red}==========${nc}
else
echo -e ${green}${name}${nc} $expect $actual
if [ ! -z "$_show_body" ];then
echo ==========
echo "$result" | sed 's/^/\t/g'
echo ==========
fi
fi
}
if [ "$1" = "body" ];then
export _show_body=1
fi
source ./common.sh
export -f log_result
echo TestName ExpectedCode ActualCode