append04.at 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. #
  3. # Test suite for GNU tar.
  4. # Copyright 2013-2023 Free Software Foundation, Inc.
  5. #
  6. # This file is part of GNU tar.
  7. #
  8. # GNU tar is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # GNU tar is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. # When called with --append and --verify options, tar would rewrite the
  21. # archive instead of appending to it.
  22. #
  23. # Last-Affected-Version: 1.26
  24. # Reported-by: Jivko Angelov <[email protected]>
  25. # References: <[email protected]>,
  26. # http://lists.gnu.org/archive/html/bug-tar/2013-07/msg00003.html
  27. AT_SETUP([append with verify])
  28. AT_KEYWORDS([append append04 verify append-verify])
  29. AT_TAR_CHECK([
  30. # Create two empty files:
  31. touch file1 file2
  32. # Create an archive:
  33. tar cpfW archive.tar file1 file2
  34. # Verify created archive by listing its content:
  35. tar -tf archive.tar
  36. echo ==
  37. # Create another empty file:
  38. touch file3
  39. # Append it to the already created archive:
  40. tar rpfW archive.tar file3
  41. # Verify content of the new archive:
  42. tar -tf archive.tar
  43. ],
  44. [0],
  45. [file1
  46. file2
  47. ==
  48. file1
  49. file2
  50. file3
  51. ])
  52. AT_CLEANUP