longv7.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #! /bin/sh
  2. # Old format (V7) archives should not accept file names longer than
  3. # 99 characters
  4. # This file is part of GNU tar testsuite.
  5. # Copyright (C) 2004 Free Software Foundation, Inc.
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  20. # 02111-1307, USA.
  21. . ./preset
  22. TAR_ARCHIVE_FORMATS="v7"
  23. . $srcdir/before
  24. DIR=this_is_a_very_long_name_for_a_directory_which_causes_problems
  25. FILE=this_is_a_very_long_file_name_which_raises_issues.c
  26. mkdir $DIR
  27. touch $DIR/$FILE
  28. tar cf archive $DIR
  29. echo separator
  30. tar tf archive
  31. err="\
  32. tar: $DIR/$FILE: file name is too long (max 99); not dumped
  33. "
  34. out="\
  35. separator
  36. $DIR/
  37. "