test-0022.sh 465 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. . ./test-common.sh
  3. cleanup 22
  4. # ------------------------------- Test 22 ------------------------------------
  5. # different base name, so it should not find the file
  6. preptest differenttest.log 22 1
  7. $RLR test-config.22 --force 2>error.log
  8. if [ $? = 0 ]; then
  9. echo "Logrotate exited with zero exit code, but it should not"
  10. fi
  11. grep "error: stat of" error.log >/dev/null
  12. if [ $? != 0 ]; then
  13. echo "No error printed, but there should be one."
  14. exit 3
  15. fi