diff --git a/server/tests/common.sh b/server/tests/common.sh index 62a3172..9aba965 100644 --- a/server/tests/common.sh +++ b/server/tests/common.sh @@ -1,3 +1,4 @@ +#!/bin/sh # Details for our bs user when testing things export id=1 export secret=secret diff --git a/server/tests/main.sh b/server/tests/main.sh index edab906..96b03fd 100644 --- a/server/tests/main.sh +++ b/server/tests/main.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # This script is basically just a convenient launch pad script for running all # the tests at once @@ -10,9 +10,24 @@ # 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 -sh ./tests/verify_basic_cases.sh + if [ $expect != $actual ];then + echo ========== + echo "$result" + echo ========== + fi +} -sh ./tests/verify_err_cases.sh +source ./common.sh +export -f show_discrepancy +echo TestName ExpectedCode ActualCode -sh ./tests/verify_mal_cases.sh +bash ./verify_basic_cases.sh + +bash ./verify_err_cases.sh + +bash ./verify_mal_cases.sh