extrac24.at 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Test suite for GNU tar. -*- autotest -*-
  2. # Copyright 2021-2023 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU tar.
  5. #
  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. #
  11. # GNU tar is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. AT_SETUP([--to-stdout])
  19. AT_KEYWORDS([extract extrac24 to-stdout])
  20. # Description: When extracting over pipe, only regular files should be
  21. # extracted. In tar 1.33 this was broken, so that members of other types
  22. # (in particular, directories) were extracted as usual. This test ensures
  23. # that this is no longer the case.
  24. #
  25. # References: https://bugs.archlinux.org/task/69373,
  26. # https://savannah.gnu.org/bugs/?60002
  27. AT_TAR_CHECK([
  28. mkdir dir/
  29. echo TEXT > dir/file
  30. tar cf a.tar dir
  31. rm -r dir
  32. tar --extract --to-stdout --file a.tar
  33. test -d dir
  34. ],
  35. [1],
  36. [TEXT
  37. ])
  38. AT_CLEANUP