extrac13.at 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 'tar' normally does follow symbolic links when extracting,
  16. # unless --dereference is specified.
  17. AT_SETUP([extract over symlinks])
  18. AT_KEYWORDS([extract extrac13])
  19. AT_TAR_CHECK([
  20. mkdir src dst1 dst2 dst3
  21. echo file1 >src/file1
  22. ln -s target1 dst1/file1
  23. echo target1 >dst1/target1
  24. echo target1 >target1
  25. tar -cf archive.tar -C src . &&
  26. tar -xf archive.tar -C dst1 --warning=no-timestamp &&
  27. diff src/file1 dst1/file1 &&
  28. diff target1 dst1/target1
  29. ln -s target1 dst2/file1
  30. echo target1 >dst2/target1
  31. tar --overwrite -xf archive.tar -C dst2 --warning=no-timestamp &&
  32. diff src/file1 dst2/file1 &&
  33. diff target1 dst2/target1
  34. ln -s target1 dst3/file1
  35. echo target1 >dst3/target1
  36. tar --overwrite -xhf archive.tar -C dst3 --warning=no-timestamp &&
  37. diff src/file1 dst3/file1 &&
  38. diff src/file1 dst3/target1
  39. ],
  40. [0],[],[],[],[],[gnu])
  41. AT_CLEANUP