spy-rm.tap 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #! /bin/sh
  2. # Copyright (C) 2012-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Check whether "rm -f" do not complain if called without file
  17. # operands. We'd like to depend on this behaviour (which seems
  18. # to hold on all non-museum systems, and will soon be mandated
  19. # by POSIX as well) in future version of automake, to simplify
  20. # automake-provided cleanup rules.
  21. # See automake bug#10828.
  22. # Other references:
  23. # <http://lists.gnu.org/archive/html/bug-autoconf/2012-02/msg00002.html>
  24. # <http://austingroupbugs.net/view.php?id=542>
  25. am_create_testdir=empty
  26. . test-init.sh
  27. plan_ 10
  28. chk ()
  29. {
  30. if test -f /bin/rm; then
  31. command_ok_ "/bin/rm $*" /bin/rm "$@"
  32. else
  33. skip_ -r "/bin/rm not found"
  34. fi
  35. command_ok_ "rm $*" rm "$@"
  36. }
  37. chk -f
  38. chk -rf
  39. chk -fr
  40. chk -f -r
  41. chk -r -f
  42. :