rename05.at 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2008 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. # Description: A continuation of rename04.at, that checks additionally if
  17. # renamed subdirectories are restored correctly.
  18. AT_SETUP([renamed subdirectories])
  19. AT_KEYWORDS([incremental rename05 rename])
  20. AT_TAR_CHECK([
  21. AT_SORT_PREREQ
  22. decho Creating directory structure
  23. mkdir directory
  24. mkdir directory/subdir
  25. genfile --file=directory/file
  26. decho Creating initial archive
  27. tar -cf archive.1 -g db.1 directory
  28. decho Renaming
  29. mv directory/subdir directory/subdir.0
  30. mv directory dir
  31. decho Creating incremental archive
  32. cp db.1 db.2
  33. tar -cf archive.2 -g db.2 dir
  34. mv dir orig
  35. decho First restore
  36. tar -xf archive.1 -g db.1
  37. find directory | sort
  38. decho Second restore
  39. tar -xf archive.2 -g db.2
  40. find dir | sort
  41. ],
  42. [0],
  43. [Creating directory structure
  44. Creating initial archive
  45. Renaming
  46. Creating incremental archive
  47. First restore
  48. directory
  49. directory/file
  50. directory/subdir
  51. Second restore
  52. dir
  53. dir/subdir.0
  54. ],
  55. [Creating directory structure
  56. Creating initial archive
  57. Renaming
  58. Creating incremental archive
  59. First restore
  60. Second restore
  61. ],[],[],[gnu, oldgnu, posix])
  62. AT_CLEANUP
  63. # End of rename05.at