extrac17.at 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Process this file with autom4te to create testsuite. -*- Autotest -*-
  2. #
  3. # Test suite for GNU tar.
  4. # Copyright (C) 2010 Free Software Foundation, Inc.
  5. #
  6. # This program 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, or (at your option)
  9. # any later version.
  10. #
  11. # This program 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([name matching/transformation ordering])
  19. AT_KEYWORDS([extract extrac17])
  20. # Description: Tar 1.24 changed the ordering of name matching and
  21. # name transformation so that the former saw already transformed
  22. # file names (see commit 9c194c99 and exclude06.at). This reverted
  23. # ordering made it impossible to match file names in certain cases.
  24. # In particular, the testcase below would not extract anything.
  25. #
  26. # Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
  27. # References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
  28. # http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
  29. AT_TAR_CHECK([
  30. mkdir dir dir/subdir1 dir/subdir2 out
  31. genfile --file dir/subdir1/file1
  32. genfile --file dir/subdir2/file2
  33. tar cf dir.tar dir
  34. tar -x -v -f dir.tar -C out --strip-components=2 --warning=no-timestamp \
  35. dir/subdir1/
  36. ],
  37. [0],
  38. [dir/subdir1/file1
  39. ])
  40. AT_CLEANUP