1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2016-2023 Free Software Foundation, Inc.
5 # This file is part of GNU tar.
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.
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.
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/>.
20 AT_SETUP([update with chdir])
21 AT_KEYWORDS([update update03 chdir])
23 # Tar <=1.29 failed to chdir when -u was used with -C
24 # Reported by: Ivan Kalvachev <ikalvachev@gmail.com>
25 # References: <CABA=pqfSq-4PJYp7W2ezGOz+fR2uh74AyA7kOeXJBzg2o-oQBA@mail.gmail.com>,
26 # http://lists.gnu.org/archive/html/bug-tar/2016-08/msg00003.html
30 mkdir dir1/subdir1 dir2/subdir2
31 genfile --file dir1/subdir1/a
32 genfile --file dir2/subdir2/a
34 tar -vcf arc.tar -C dir1 subdir1 -C ../dir2 subdir2
35 genfile --file dir1/subdir1/b
36 genfile --file dir2/subdir2/c
38 tar -vuf arc.tar -C dir1 subdir1 -C ../dir2 subdir2