test_log_output.sh 678 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env sh
  2. OUTPUT_FILE=test.log
  3. . ./test_vars
  4. . $(dirname $0)/test_output_strings
  5. test_log_output ( ) {
  6. rm -f ${OUTPUT_FILE}
  7. ./ex_output${EXEEXT} "${1}" "LOG" "NORMAL" > /dev/null
  8. actual=`cat ${OUTPUT_FILE} | tr -d "\r"`
  9. expected=${2}
  10. if [ x"${expected}" != x"${actual}" ]; then
  11. echo "Problem with ex_log_output${EXEEXT} ${1} LOG NORMAL";
  12. echo "Expected:";
  13. echo "${expected}";
  14. echo "Got:";
  15. echo "${actual}";
  16. exit 1;
  17. fi
  18. }
  19. test_log_output "CK_SILENT" "${expected_log_log}"
  20. test_log_output "CK_MINIMAL" "${expected_log_log}"
  21. test_log_output "CK_NORMAL" "${expected_log_log}"
  22. test_log_output "CK_VERBOSE" "${expected_log_log}"
  23. exit 0