incr03.at 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2006 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. # Description:
  17. # Previous versions checked only mtime/ctime of directories during
  18. # incremental backups. As a result, it sufficed to rename a single file
  19. # to get full dump of the directory where it resided. Since v.1.15.91
  20. # tar checks directory contents as well, so in this case only the renamed
  21. # file is dumped.
  22. AT_SETUP([renamed files in incrementals])
  23. AT_KEYWORDS([incremental incr03 rename])
  24. AT_TAR_CHECK([
  25. AT_SORT_PREREQ
  26. mkdir directory
  27. genfile --file=directory/x
  28. genfile --file=directory/y
  29. tar -cf archive.1 -g db directory
  30. mv directory/x directory/z
  31. tar -cf archive.2 -g db directory
  32. mv directory orig
  33. echo Listing of archive.1
  34. tar -tf archive.1 | sort
  35. echo Listing of archive.2
  36. tar -tf archive.2 | sort
  37. echo Directory after first restore
  38. tar -xf archive.1 -g db
  39. find directory | sort
  40. echo Directory after second restore
  41. tar -xf archive.2 -g db
  42. find directory | sort
  43. ],
  44. [0],
  45. [Listing of archive.1
  46. directory/
  47. directory/x
  48. directory/y
  49. Listing of archive.2
  50. directory/
  51. directory/z
  52. Directory after first restore
  53. directory
  54. directory/x
  55. directory/y
  56. Directory after second restore
  57. directory
  58. directory/y
  59. directory/z
  60. ],[],[],[],[gnu, oldgnu, posix])
  61. AT_CLEANUP
  62. # End of incr03.at