delete03.at 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2004, 2007, 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. AT_SETUP([deleting members with long names])
  17. AT_KEYWORDS([delete delete03])
  18. m4_pushdef([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX])
  19. AT_TAR_CHECK([
  20. prefix=PREFIX
  21. rm -f $prefix*
  22. for i in 1 2 3 4 5 6 7 8 9
  23. do touch $prefix$i
  24. done
  25. tar -cf archive ./$prefix* &&
  26. tar --delete -f archive ./${prefix}5 &&
  27. tar -tf archive
  28. ],
  29. [0],
  30. [./PREFIX[]1
  31. ./PREFIX[]2
  32. ./PREFIX[]3
  33. ./PREFIX[]4
  34. ./PREFIX[]6
  35. ./PREFIX[]7
  36. ./PREFIX[]8
  37. ./PREFIX[]9
  38. ],[],[],[],[gnu, oldgnu, posix])
  39. m4_popdef([PREFIX])
  40. AT_CLEANUP