test-0071.sh 500 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 71
  4. # ------------------------------- Test 71 ------------------------------------
  5. # Rotation should occur because file is old
  6. preptest test.log 71 2
  7. # Set log modification time to some date in the past
  8. touch -t 200001010000 test.log
  9. # Put in place a state file that will force a rotation
  10. cat > state <<EOF
  11. logrotate state -- version 2
  12. "$PWD/test.log" 2000-1-1
  13. EOF
  14. $RLR test-config.71
  15. checkoutput <<EOF
  16. test.log 0
  17. test.log.1 0 zero
  18. test.log.2 0 first
  19. EOF