test-0066.sh 480 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 66
  4. # ------------------------------- Test 66 ------------------------------------
  5. # When using %Y in the dateformat, the old logs are not removed
  6. preptest test.log 66 1 0
  7. DATESTRING=$(/bin/date +%Y%m%d)
  8. DAYAGO=$(/bin/date "+%Y-%m-%d" --date "1 day ago" 2>/dev/null)
  9. echo removed > "test.log$DAYAGO"
  10. $RLR test-config.66 --force
  11. checkoutput <<EOF
  12. test.log 0
  13. EOF
  14. if [ -f test.log$DAYAGO ]; then
  15. echo "file $file does exist!"
  16. exit 2
  17. fi