remfiles06.at 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. # Test suite for GNU tar.
  3. # Copyright 2013 Free Software Foundation, Inc.
  4. #
  5. # GNU tar is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # GNU tar is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. # Description: There was a leftover call to chdir in name_next_elt() in
  18. # tar 1.26. After commit e3d28d84 this call would confuse the tar_getcwd
  19. # function.
  20. # Reported by: Nathan Stratton Treadway <[email protected]>
  21. # References: <[email protected]>,
  22. # http://lists.gnu.org/archive/html/bug-tar/2013-09/msg00045.html
  23. AT_SETUP([remove with two -C])
  24. AT_KEYWORDS([remove-files remfiles06])
  25. AT_TAR_CHECK([
  26. AT_SORT_PREREQ
  27. mkdir tartest
  28. cd tartest
  29. mkdir foo
  30. echo foo/file > foo/file
  31. mkdir bar
  32. echo bar/file > bar/file
  33. decho A
  34. find|sort
  35. decho B
  36. tar -cvf ../foo.tar --remove-files -C foo file -C ../bar file
  37. decho C
  38. find|sort
  39. ],
  40. [0],
  41. [A
  42. .
  43. ./bar
  44. ./bar/file
  45. ./foo
  46. ./foo/file
  47. B
  48. file
  49. file
  50. C
  51. .
  52. ./bar
  53. ./foo
  54. ],
  55. [A
  56. B
  57. C
  58. ],[],[],[gnu])
  59. AT_CLEANUP