listed01.at 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2004-2007, 2009, 2013 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. # Check if listed-incremental backups work for individual files.
  16. # Script proposed by Andreas Schuldei <[email protected]>
  17. # References: <[email protected]>
  18. # http://lists.gnu.org/archive/html/bug-tar/2004-02/msg00011.html
  19. AT_SETUP([--listed for individual files])
  20. AT_KEYWORDS([listed incremental listed01])
  21. AT_TAR_CHECK([
  22. mkdir directory
  23. genfile --length 10240 --pattern zeros --file directory/file1
  24. # Let the things settle
  25. sleep 1
  26. tar --create \
  27. --file=archive.1 \
  28. --listed-incremental=listing \
  29. directory/file*
  30. tar tf archive.1 || exit 1
  31. sleep 2
  32. genfile --length 10240 --pattern zeros --file directory/file2
  33. echo "separator"
  34. cp listing listing.old
  35. tar --create \
  36. --file=archive.2 \
  37. --listed-incremental=listing \
  38. directory/file* || exit 1
  39. tar tf archive.2 || exit 1
  40. ],
  41. [0],
  42. [directory/file1
  43. separator
  44. directory/file2
  45. ],
  46. [],[],[],[gnu, oldgnu])
  47. AT_CLEANUP