exclude06.at 1.5 KB

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