]> Dogcows Code - chaz/tar/blob - tests/extrac17.at
Make sure name matching occurs before name transformation.
[chaz/tar] / tests / extrac17.at
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
19 AT_SETUP([name matching/transformation ordering])
20 AT_KEYWORDS([extract extrac17])
21
22 # Description: Tar 1.24 changed the ordering of name matching and
23 # name transformation so that the former saw already transformed
24 # file names (see commit 9c194c99 and exclude06.at). This reverted
25 # ordering made it impossible to match file names in certain cases.
26 # In particular, the testcase below would not extract anything.
27 #
28 # Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
29 # References: <x6r5fd9jye@gzp>, <20101026175126.29028@Pirx.gnu.org.ua>
30 # http://lists.gnu.org/archive/html/bug-tar/2010-10/msg00047.html
31
32 AT_TAR_CHECK([
33 mkdir dir dir/subdir1 dir/subdir2 out
34 genfile --file dir/subdir1/file1
35 genfile --file dir/subdir2/file2
36
37 tar cf dir.tar dir
38
39 tar -x -v -f dir.tar -C out --strip-components=2 dir/subdir1/
40 ],
41 [0],
42 [dir/subdir1/file1
43 ])
44
45 AT_CLEANUP
46
47
48
49
This page took 0.041769 seconds and 5 git commands to generate.