update01.at 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2009-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. # Description: If dir is a directory and arc is a tar archive which
  16. # contains that directory, and dir contains some modifications added
  17. # after adding it to the archive, then 'tar -u dir' would add dir/ to
  18. # the archive.
  19. # Last-Affected-Version: 1.22.90
  20. # References: <[email protected]>
  21. # http://lists.gnu.org/archive/html/bug-tar/2009-10/msg00017.html
  22. AT_SETUP([update directories])
  23. AT_KEYWORDS([update update01])
  24. AT_TAR_CHECK([
  25. AT_SORT_PREREQ
  26. mkdir a
  27. genfile --file a/b
  28. tar cf arc a
  29. echo "separator"
  30. sleep 2
  31. genfile --file a/c
  32. tar ufv arc a
  33. echo "separator"
  34. tar tf arc | sort || exit 1
  35. ],
  36. [0],
  37. [separator
  38. a/c
  39. separator
  40. a/
  41. a/b
  42. a/c
  43. ])
  44. AT_CLEANUP