rename01.at 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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: 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. mkdir foo
  22. genfile --file foo/file1
  23. genfile --file foo/file2
  24. mkdir foo/bar
  25. genfile --file foo/bar/file
  26. echo "Creating base archive"
  27. tar -g incr -cf arch.1 -v foo
  28. mv foo/bar foo/baz
  29. echo "Creating incremental archive"
  30. tar -g incr -cf arch.2 -v foo
  31. mv foo old
  32. tar xfg arch.1 /dev/null
  33. echo "Begin directory listing 1"
  34. find foo | sort
  35. echo "End directory listing 1"
  36. tar xfg arch.2 /dev/null
  37. echo Begin directory listing 2
  38. find foo | sort
  39. echo End directory listing 2
  40. ],
  41. [0],
  42. [Creating base archive
  43. foo/
  44. foo/bar/
  45. foo/file1
  46. foo/file2
  47. foo/bar/file
  48. Creating incremental archive
  49. foo/
  50. foo/baz/
  51. Begin directory listing 1
  52. foo
  53. foo/bar
  54. foo/bar/file
  55. foo/file1
  56. foo/file2
  57. End directory listing 1
  58. Begin directory listing 2
  59. foo
  60. foo/baz
  61. foo/baz/file
  62. foo/file1
  63. foo/file2
  64. End directory listing 2
  65. ],
  66. [tar: foo/bar: Directory is new
  67. tar: foo/baz: Directory has been renamed from `foo/bar'
  68. ],
  69. [],[],[gnu, oldgnu, posix])
  70. AT_CLEANUP
  71. # End of rename01.at