test-0079.sh 651 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 79
  4. # ------------------------------- Test 79 ------------------------------------
  5. preptest test.log 79 1
  6. $RLR test-config.79 -v --force >verbose.log
  7. if [ $? != 0 ]; then
  8. echo "Logrotate exited with a non-zero exit code, but it should not have"
  9. exit 3
  10. fi
  11. grep -e "^Final rotated log filename should be empty in prerotate: $" verbose.log >/dev/null
  12. if [ $? != 0 ]; then
  13. echo "Expected prerotate message to not include final filename."
  14. exit 3
  15. fi
  16. grep -e "^Final rotated log filename is: .*test.log.1$" verbose.log >/dev/null
  17. if [ $? != 0 ]; then
  18. echo "Expected postrotate message not printed."
  19. exit 3
  20. fi