extrac17.at 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. #
  3. # Test suite for GNU tar.
  4. # Copyright 2010-2023 Free Software Foundation, Inc.
  5. # This file is part of GNU tar.
  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. # 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. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. AT_SETUP([name matching/transformation ordering])
  17. AT_KEYWORDS([extract extrac17 chdir])
  18. # Description: Tar 1.24 changed the ordering of name matching and
  19. # name transformation so that the former saw already transformed
  20. # file names (see commit 9c194c99 and exclude06.at). This reverted
  21. # ordering made it impossible to match file names in certain cases.
  22. # In particular, the testcase below would not extract anything.
  23. #
  24. # Reported-by: "Gabor Z. Papp" <[email protected]>
  25. # References: <x6r5fd9jye@gzp>, <[email protected]>
  26. # http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
  27. AT_TAR_CHECK([
  28. mkdir dir dir/subdir1 dir/subdir2 out
  29. genfile --file dir/subdir1/file1
  30. genfile --file dir/subdir2/file2
  31. tar cf dir.tar dir
  32. tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
  33. dir/subdir1/
  34. ],
  35. [0],
  36. [dir/subdir1/file1
  37. ])
  38. AT_CLEANUP