pipe.at 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2004-2009, 2013-2014, 2016-2017 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. # Recognition of compressed formats, introduced with tar 1.15, broke
  17. # untarring of archives from standard input.
  18. # References:
  19. # 1) <20041221040834.GA9635@tigers-lfs.nsw.bigpond.net.au>
  20. # http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00031.html
  21. # 2) <20041221093801.GA55537@engelschall.com>
  22. # http://lists.gnu.org/archive/html/bug-tar/2004-12/msg00026.html
  23. AT_SETUP([decompressing from stdin])
  24. AT_KEYWORDS([pipe])
  25. AT_TAR_CHECK([
  26. AT_SORT_PREREQ
  27. mkdir directory
  28. genfile --length 10240 --pattern zeros --file directory/file1
  29. genfile --length 13 --file directory/file2
  30. tar cf archive directory
  31. mv directory orig
  32. cat archive | tar xfv - --warning=no-timestamp | sort
  33. echo "separator"
  34. cmp orig/file1 directory/file1
  35. echo "separator"
  36. cmp orig/file2 directory/file2],
  37. [0],
  38. [directory/
  39. directory/file1
  40. directory/file2
  41. separator
  42. separator
  43. ])
  44. AT_CLEANUP