longv7.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. # Old format (V7) archives should not accept file names longer than
  16. # 99 characters
  17. AT_SETUP([long names in V7 archives])
  18. AT_KEYWORDS([longname longv7])
  19. m4_pushdef([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems])
  20. m4_pushdef([FILE],[this_is_a_very_long_file_name_which_raises_issues.c])
  21. AT_TAR_CHECK([
  22. mkdir DIR
  23. touch DIR/FILE
  24. tar cf archive DIR
  25. echo separator
  26. tar tf archive
  27. ],
  28. [0],
  29. [separator
  30. DIR/
  31. ],
  32. [tar: DIR/FILE: file name is too long (max 99); not dumped
  33. tar: Exiting with failure status due to previous errors
  34. ],
  35. [],[],[v7])
  36. m4_popdef([FILE])
  37. m4_popdef([DIR])
  38. AT_CLEANUP