test-0026.sh 516 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 26
  4. # ------------------------------- Test 26 ------------------------------------
  5. # If there is error in config file, log should not be rotated and original log
  6. # should be untouched
  7. preptest test.log 26 1 0
  8. # log with 1 byte should not be rotated
  9. $RLR test-config.26 2>error.log
  10. grep "unknown option" error.log >/dev/null
  11. if [ $? != 0 ]; then
  12. echo "No error printed, but there should be one."
  13. exit 3
  14. fi
  15. rm error.log
  16. checkoutput <<EOF
  17. test.log 0
  18. test.log.1 0 zero
  19. EOF