test-0067.sh 605 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 67
  4. # ------------------------------- Test 67 ------------------------------------
  5. # firstaction and lastaction scripts should be called if no file is rotated
  6. preptest test.log 67 1 0
  7. DATESTRING=$(/bin/date +%Y%m%d)
  8. TODAY=$(/bin/date "+%Y-%m-%d" 2>/dev/null)
  9. echo removed > "test.log$TODAY"
  10. $RLR test-config.67 --force
  11. cat scriptout|grep firstaction >/dev/null
  12. if [ $? != 0 ]; then
  13. echo "scriptout should contain 'firstaction'"
  14. exit 3
  15. fi
  16. cat scriptout|grep lastaction >/dev/null
  17. if [ $? != 0 ]; then
  18. echo "scriptout should contain 'lastaction'"
  19. exit 3
  20. fi