extrac10.at 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright (C) 2010 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, see <http://www.gnu.org/licenses/>.
  14. # written by Paul Eggert
  15. # Check that delayed setting of directory metadata does not collide
  16. # with the -C option. When setting a directory's permissions, time
  17. # stamps, etc., tar should apply the -C option that was in effect when
  18. # the directory was extracted, not the -C option that happens to be in
  19. # effect when the metadata are later set.
  20. AT_SETUP([-C and delayed setting of metadata])
  21. AT_KEYWORDS([extract extrac10])
  22. AT_TAR_CHECK([
  23. mkdir d x x/y
  24. echo foo >d/d1
  25. echo bar >e
  26. tar -cf archive.tar d e &&
  27. tar -xf archive.tar -C x d -C y e &&
  28. diff -r d x/d &&
  29. diff e x/y/e
  30. ],
  31. [0],
  32. [],
  33. [],[],[],[gnu])
  34. AT_CLEANUP