1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2006-2007, 2009, 2013-2014, 2016-2017 Free Software
7 # This file is part of GNU tar.
9 # GNU tar is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # GNU tar is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 # Description: Incremental archives should be able to handle directories
23 # moved between directory hierarchies.
25 AT_SETUP([move between hierarchies])
26 AT_KEYWORDS([incremental rename rename02])
31 genfile --file foo/file1
32 genfile --file foo/file2
34 genfile --file foo/bar/file.r
36 genfile --file foo/bar/baz/file.z
40 echo "Creating base archive"
41 tar -g incr -cf arch.1 -v foo
45 echo "Creating incremental archive"
46 tar -g incr -cf arch.2 -v foo
50 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
53 echo "Begin directory listing 1"
55 echo "End directory listing 1"
57 tar xfgv arch.2 /dev/null --warning=no-timestamp
58 echo Begin directory listing 2
60 echo End directory listing 2
63 [Creating base archive
71 Creating incremental archive
75 Begin directory listing 1
83 End directory listing 1
87 Begin directory listing 2
95 End directory listing 2
97 [tar: foo: Directory is new
98 tar: foo/bar: Directory is new
99 tar: foo/bar/baz: Directory is new
100 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
102 [],[],[gnu, oldgnu, posix])