delete02.at 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2004-2005, 2007, 2013-2014, 2016 Free Software Foundation,
  4. # Inc.
  5. # This file is part of GNU tar.
  6. # GNU tar is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  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. # 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. # Deleting a member with the archive from stdin was not working correctly.
  17. AT_SETUP([deleting a member from stdin archive])
  18. AT_KEYWORDS([delete delete02])
  19. AT_TAR_CHECK([
  20. genfile -l 3073 -p zeros --file 1
  21. cp 1 2
  22. cp 2 3
  23. tar cf archive 1 2 3
  24. tar tf archive
  25. cat archive | tar f - --delete 2 > archive2
  26. echo separator
  27. tar tf archive2],
  28. [0],
  29. [1
  30. 2
  31. 3
  32. separator
  33. 1
  34. 3
  35. ])
  36. AT_CLEANUP