]> git.cworth.org Git - tar/blob - tests/extrac10.at
upstream: Fix extraction of device nodes.
[tar] / tests / extrac10.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 # written by Paul Eggert
20
21 # Check that delayed setting of directory metadata does not collide
22 # with the -C option.  When setting a directory's permissions, time
23 # stamps, etc., tar should apply the -C option that was in effect when
24 # the directory was extracted, not the -C option that happens to be in
25 # effect when the metadata are later set.
26
27 AT_SETUP([-C and delayed setting of metadata])
28 AT_KEYWORDS([extract extrac10])
29
30 AT_TAR_CHECK([
31 mkdir d x x/y
32 echo foo >d/d1
33 echo bar >e
34
35 tar -cf archive.tar d e &&
36 tar -xf archive.tar -C x d -C y e &&
37 diff -r d x/d &&
38 diff e x/y/e
39 ],
40 [0],
41 [],
42 [],[],[],[gnu])
43
44 AT_CLEANUP