rename05.at 1.9 KB

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