File: test_log_output.sh

package info (click to toggle)
check 0.15.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,404 kB
  • sloc: ansic: 11,759; sh: 5,258; makefile: 334
file content (28 lines) | stat: -rwxr-xr-x 678 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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"`
    expected=${2}
    if [ x"${expected}" != 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