exclude06.at 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Copyright 2010-2023 Free Software Foundation, Inc.
  3. # This file is part of GNU tar.
  4. # GNU tar is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3 of the License, or
  7. # (at your option) any later version.
  8. # GNU tar is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. # Tar 1.23 would fail to exclude names longer that 100 characters from
  15. # pax format archives.
  16. #
  17. # Reported-by: Matthew Peterson <[email protected]>
  18. # References: <[email protected]>
  19. # http://lists.gnu.org/archive/html/help-tar/2010-06/msg00000.html
  20. AT_SETUP([exclude: long files in pax archives])
  21. AT_KEYWORDS([exclude exclude06 chdir])
  22. m4_pushdef([test_base_dir],[one/two/three/four/five/six/seven/eight/nine/ten/eleven/twelve/thirteen/fourteen/fifteen/sixteen/seventeen])
  23. AT_TAR_CHECK([
  24. AT_TAR_MKHIER(test_base_dir)
  25. genfile --length 20 -f test_base_dir[/1.txt]
  26. genfile --length 20 -f test_base_dir[/1.c]
  27. tar cf archive.tar test_base_dir
  28. mkdir out
  29. tar -C out -xf archive.tar --exclude='*.txt' --warning=no-timestamp
  30. find out -type f
  31. ],
  32. [0],
  33. [[out/]test_base_dir[/1.c]
  34. ],
  35. [],
  36. [],
  37. [],
  38. [pax])
  39. m4_popdef([test_base_dir])
  40. AT_CLEANUP