Debian Codegraph @

tests/update03.at

raw
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2016-2023 Free Software Foundation, Inc.
4 #
5 # This file is part of GNU tar.
6 #
7 # GNU tar is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # GNU tar is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 AT_SETUP([update with chdir])
21 AT_KEYWORDS([update update03 chdir])
22
23 # Tar <=1.29 failed to chdir when -u was used with -C
24 # Reported by: Ivan Kalvachev <[email protected]>
25 # References: <CABA=pqfSq-4PJYp7W2ezGOz+fR2uh74AyA7kOeXJBzg2o-oQBA@mail.gmail.com>,
26 # http://lists.gnu.org/archive/html/bug-tar/2016-08/msg00003.html
27 AT_TAR_CHECK([
28 mkdir dir1
29 mkdir dir2
30 mkdir dir1/subdir1 dir2/subdir2
31 genfile --file dir1/subdir1/a
32 genfile --file dir2/subdir2/a
33 echo Create
34 tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
35 genfile --file dir1/subdir1/b
36 genfile --file dir2/subdir2/c
37 echo Update
38 tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
39 ],
40 [0],
41 [Create
42 subdir1/
43 subdir1/a
44 subdir2/
45 subdir2/a
46 Update
47 subdir1/b
48 subdir2/c
49 ])
50
51 AT_CLEANUP