test-0017.sh 608 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 17
  4. # ------------------------------- Test 17 ------------------------------------
  5. preptest test.log 17 1 0
  6. # log with 1 byte should not be rotated
  7. $RLR test-config.17 -l logrotate.log 2>error.log
  8. grep "unexpected } (missing previous '{')" error.log >/dev/null
  9. if [ $? != 0 ]; then
  10. echo "No error printed, but there should be one."
  11. exit 3
  12. fi
  13. rm error.log
  14. grep "reading config file test-config.17" logrotate.log >/dev/null
  15. if [ $? != 0 ]; then
  16. echo "There is no log output in logrotate.log"
  17. exit 3
  18. fi
  19. rm -f logrotate.log
  20. checkoutput <<EOF
  21. test.log 0 zero
  22. EOF