remfiles02.at 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2009 Free Software Foundation, Inc.
  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 3, or (at your option)
  7. # any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. # 02110-1301, USA.
  16. # Description: When called with --create --remove-files and a compression
  17. # options tar (v. <= 1.22.90) would remove files even if it had failed
  18. # to store them in the archive.
  19. #
  20. # References: <[email protected]>
  21. # http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00005.html
  22. AT_SETUP([remove-files with compression: grand-child])
  23. AT_KEYWORDS([create remove-files remfiles02 gzip])
  24. unset TAR_OPTIONS
  25. AT_CHECK([
  26. AT_GZIP_PREREQ
  27. AT_SORT_PREREQ
  28. mkdir dir
  29. cd dir
  30. mkdir a
  31. genfile --file b
  32. mkdir c
  33. tar -c -f a -z --remove-files b c
  34. find . | sort
  35. ],
  36. [0],
  37. [.
  38. ./a
  39. ./b
  40. ./c
  41. ],
  42. [tar (child): a: Cannot open: Is a directory
  43. tar (child): Error is not recoverable: exiting now
  44. tar: Child returned status 2
  45. tar: Error is not recoverable: exiting now
  46. ])
  47. AT_CLEANUP