delete03.at 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2004-2023 Free Software Foundation, Inc.
  4. # This file is part of GNU tar.
  5. # GNU tar is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. # GNU tar is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. AT_SETUP([deleting members with long names])
  16. AT_KEYWORDS([delete delete03])
  17. 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])
  18. AT_TAR_CHECK([
  19. prefix=PREFIX
  20. rm -f $prefix*
  21. for i in 1 2 3 4 5 6 7 8 9
  22. do touch $prefix$i
  23. done
  24. tar -cf archive ./$prefix* &&
  25. tar --delete -f archive ./${prefix}5 &&
  26. tar -tf archive
  27. ],
  28. [0],
  29. [./PREFIX[]1
  30. ./PREFIX[]2
  31. ./PREFIX[]3
  32. ./PREFIX[]4
  33. ./PREFIX[]6
  34. ./PREFIX[]7
  35. ./PREFIX[]8
  36. ./PREFIX[]9
  37. ],[],[],[],[gnu, oldgnu, posix])
  38. m4_popdef([PREFIX])
  39. AT_CLEANUP