update.at 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2005-2007, 2013-2014, 2016-2017 Free Software Foundation,
  4. # Inc.
  5. # This file is part of GNU tar.
  6. # GNU tar is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Check that tar --update does not add non-changed directories to the
  17. # archive.
  18. # References: <42AB0D28.6030706@mein-horde.de>
  19. # by Martin Lohmeier <martin@mein-horde.de>
  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