test-0054.sh 512 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 54
  4. # ------------------------------- Test 54 ------------------------------------
  5. # removing last log file when using %Y-%m-%d
  6. rm -f *test.log*
  7. preptest test.log 54 1 0
  8. DATE=""
  9. for i in $(seq 1 60)
  10. do
  11. DATE=$(/bin/date "+%Y-%m-%d" --date "$i day ago" 2>/dev/null)
  12. echo "x" > test.log-$DATE
  13. done
  14. $RLR test-config.54 --force
  15. if [ -e test.log-$DATE ]; then
  16. echo "File test.log-$DATE should not exist (it should be deleted)"
  17. exit 3
  18. fi
  19. rm -f *test.log*