mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-09 08:56:15 +00:00
28 lines
653 B
Bash
Executable File
28 lines
653 B
Bash
Executable File
#!/usr/bin/env sh
|
|
|
|
OUTPUT_FILE=test.log
|
|
|
|
. ./test_vars
|
|
. $(dirname $0)/test_output_strings
|
|
|
|
test_log_output ( ) {
|
|
rm -f ${OUTPUT_FILE}
|
|
./ex_output${EXEEXT} "${1}" "LOG" "NORMAL" > /dev/null
|
|
actual=`cat ${OUTPUT_FILE} | tr -d "\r"`
|
|
if [ x"${2}" != x"${actual}" ]; then
|
|
echo "Problem with ex_log_output${EXEEXT} ${1} LOG NORMAL";
|
|
echo "Expected:";
|
|
echo "${expected}";
|
|
echo "Got:";
|
|
echo "${actual}";
|
|
exit 1;
|
|
fi
|
|
|
|
}
|
|
|
|
test_log_output "CK_SILENT" "${expected_log_log}"
|
|
test_log_output "CK_MINIMAL" "${expected_log_log}"
|
|
test_log_output "CK_NORMAL" "${expected_log_log}"
|
|
test_log_output "CK_VERBOSE" "${expected_log_log}"
|
|
exit 0
|