update.at 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3, or (at your option)
  7. # any later version.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with this program; if not, write to the Free Software
  14. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  15. # 02110-1301, USA.
  16. # Check that tar --update does not add non-changed directories to the
  17. # archive.
  18. # References: <[email protected]>
  19. # by Martin Lohmeier <[email protected]>
  20. # on Sat, 11 Jun 2005 18:11:20 +0200
  21. # http://lists.gnu.org/archive/html/bug-tar/2005-06/msg00024.html
  22. AT_SETUP([update unchanged directories])
  23. AT_KEYWORDS([update update00])
  24. AT_TAR_CHECK([
  25. AT_SORT_PREREQ
  26. mkdir directory
  27. genfile --length 10240 --pattern zeros --file directory/file1
  28. genfile --length 10240 --pattern default --file directory/file2
  29. tar cf archive directory || exit 1
  30. echo separator
  31. tar uf archive directory || exit 1
  32. echo separator
  33. tar tf archive | sort || exit 1
  34. ],
  35. [0],
  36. [separator
  37. separator
  38. directory/
  39. directory/file1
  40. directory/file2
  41. ])
  42. AT_CLEANUP