update.at 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2005 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 2, 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. AT_SETUP([update unchanged directories])
  22. AT_KEYWORDS([update])
  23. AT_TAR_CHECK([
  24. mkdir directory
  25. genfile --length 10240 --pattern zeros --file directory/file1
  26. genfile --length 10240 --pattern default --file directory/file2
  27. tar cf archive directory || exit 1
  28. echo separator
  29. tar uf archive directory || exit 1
  30. echo separator
  31. tar tf archive | sort 2>/dev/null || exit 1
  32. ],
  33. [0],
  34. [separator
  35. separator
  36. directory/
  37. directory/file1
  38. directory/file2
  39. ])
  40. AT_CLEANUP