remfiles05.at 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2013 Free Software Foundation, Inc.
  4. #
  5. # GNU tar is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. # Description: Tar 1.26 would remove wrong files when invoked with
  18. # --listed-incremental and -C
  19. # Reported by: Nathan Stratton Treadway <nathanst@ontko.com>
  20. # References: <20130921171234.GG32256@shire.ontko.com>,
  21. # http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00028.html
  22. AT_SETUP([incremental and -C])
  23. AT_KEYWORDS([incremental create remove-files remfiles05])
  24. AT_TAR_CHECK([
  25. AT_SORT_PREREQ
  26. mkdir foo
  27. echo bar > bar
  28. echo foo/bar > foo/bar
  29. decho A
  30. find . | sort
  31. decho B
  32. tar -cvf foo.tar --listed-incremental=foo.snar --remove-files -C foo bar
  33. decho C
  34. find . | sort
  35. ],
  36. [0],
  37. [A
  38. .
  39. ./bar
  40. ./foo
  41. ./foo/bar
  42. B
  43. bar
  44. C
  45. .
  46. ./bar
  47. ./foo
  48. ./foo.snar
  49. ./foo.tar
  50. ],
  51. [A
  52. B
  53. C
  54. ],[],[],[gnu])
  55. AT_CLEANUP