rename01.at 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2006, 2007 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: Test basic handling of renamed directory in the incremental
  17. # archives.
  18. AT_SETUP([renamed dirs in incrementals])
  19. AT_KEYWORDS([incremental rename rename01])
  20. AT_TAR_CHECK([
  21. AT_SORT_PREREQ
  22. mkdir foo
  23. genfile --file foo/file1
  24. genfile --file foo/file2
  25. mkdir foo/bar
  26. genfile --file foo/bar/file
  27. echo "Creating base archive"
  28. tar -g incr -cf arch.1 -v foo
  29. mv foo/bar foo/baz
  30. echo "Creating incremental archive"
  31. tar -g incr -cf arch.2 -v foo
  32. mv foo old
  33. tar xfg arch.1 /dev/null
  34. echo "Begin directory listing 1"
  35. find foo | sort
  36. echo "End directory listing 1"
  37. tar xfg arch.2 /dev/null
  38. echo Begin directory listing 2
  39. find foo | sort
  40. echo End directory listing 2
  41. ],
  42. [0],
  43. [Creating base archive
  44. foo/
  45. foo/bar/
  46. foo/file1
  47. foo/file2
  48. foo/bar/file
  49. Creating incremental archive
  50. foo/
  51. foo/baz/
  52. Begin directory listing 1
  53. foo
  54. foo/bar
  55. foo/bar/file
  56. foo/file1
  57. foo/file2
  58. End directory listing 1
  59. Begin directory listing 2
  60. foo
  61. foo/baz
  62. foo/baz/file
  63. foo/file1
  64. foo/file2
  65. End directory listing 2
  66. ],
  67. [tar: foo/bar: Directory is new
  68. tar: foo/baz: Directory has been renamed from `foo/bar'
  69. ],
  70. [],[],[gnu, oldgnu, posix])
  71. AT_CLEANUP
  72. # End of rename01.at