pipe.at 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2004, 2005, 2006, 2007, 2008,
  4. # 2009 Free Software Foundation, Inc.
  5. # This program 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, or (at your option)
  8. # any later version.
  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. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. # 02110-1301, USA.
  17. # Recognition of compressed formats, introduced with tar 1.15, broke
  18. # untarring of archives from standard input.
  19. # References:
  20. # 1) <[email protected]>
  21. # http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00031.html
  22. # 2) <[email protected]>
  23. # http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00026.html
  24. AT_SETUP([decompressing from stdin])
  25. AT_KEYWORDS([pipe])
  26. AT_TAR_CHECK([
  27. AT_SORT_PREREQ
  28. mkdir directory
  29. genfile --length 10240 --pattern zeros --file directory/file1
  30. genfile --length 13 --file directory/file2
  31. tar cf archive directory
  32. mv directory orig
  33. cat archive | tar xfv - --warning=no-timestamp | sort
  34. echo "separator"
  35. cmp orig/file1 directory/file1
  36. echo "separator"
  37. cmp orig/file2 directory/file2],
  38. [0],
  39. [directory/
  40. directory/file1
  41. directory/file2
  42. separator
  43. separator
  44. ])
  45. AT_CLEANUP