02-c-dry-run-no-keyfile.sh 809 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. ### Constants
  3. c_valgrind_min=1
  4. samplefile=${scriptdir}/test_tarsnap.sh
  5. out_stats_stderr=${s_basename}-output-stats.stderr
  6. scenario_cmd() {
  7. # Check -c --dry-run --print-stats. The precise stats
  8. # will vary based on the system, so we can't check those.
  9. setup_check "check -c --dry-run"
  10. ${c_valgrind_cmd} ./tarsnap --no-default-config \
  11. -c --dry-run --print-stats \
  12. "${samplefile}" \
  13. 2> "${out_stats_stderr}"
  14. echo $? > "${c_exitfile}"
  15. # Check expected warning message.
  16. setup_check "check -c --dry-run output"
  17. grep -q "tarsnap: Removing leading" "${out_stats_stderr}"
  18. echo $? > "${c_exitfile}"
  19. # Check another expected warning message.
  20. setup_check "check -c --dry-run warning"
  21. grep -q "(sizes may be slightly inaccurate)" "${out_stats_stderr}"
  22. echo $? > "${c_exitfile}"
  23. }