freechat/server/tests/main.sh
2020-07-27 15:43:00 -07:00

34 lines
723 B
Bash

#!/bin/bash
# This script is basically just a convenient launch pad script for running all
# the tests at once
# Most tests should be runnable by doing ./script.sh name_of_test
# First the 'good' input tests
# This is to say that we get input that:
# 1. is properly formatted
# 2. has all the info we need & none we don't
# 3. has basically nothing malicious about it
show_discrepancy() {
expect=$1
actual=$2
result=$3
if [ $expect != $actual ];then
echo ==========
echo "$result"
echo ==========
fi
}
source ./common.sh
export -f show_discrepancy
echo TestName ExpectedCode ActualCode
bash ./verify_basic_cases.sh
bash ./verify_err_cases.sh
bash ./verify_mal_cases.sh