4
0

extrac25.at 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Test suite for GNU tar. -*- autotest -*-
  2. # Copyright 2022-2023 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU tar.
  5. #
  6. # GNU tar is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # GNU tar is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. AT_SETUP([extract over parent dir that is dangling symlink])
  19. AT_KEYWORDS([extract extrac25])
  20. AT_TAR_CHECK([
  21. mkdir subdir
  22. touch subdir/a.txt
  23. tar -cf test.tar subdir/a.txt
  24. rm -rf subdir
  25. ln -s does_not_exist subdir
  26. tar -xvf test.tar
  27. ],
  28. [2],
  29. [subdir/a.txt
  30. ],
  31. [tar: subdir: Cannot mkdir: File exists
  32. tar: subdir/a.txt: Cannot open: No such file or directory
  33. tar: Exiting with failure status due to previous errors
  34. ])
  35. AT_CLEANUP