re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / rename02.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2006-2007, 2009, 2013-2014, 2016 Free Software Foundation,
5 # Inc.
6
7 # This file is part of GNU tar.
8
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.
13
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.
18
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/>.
21
22 # Description: Incremental archives should be able to handle directories
23 # moved between directory hierarchies.
24
25 AT_SETUP([move between hierarchies])
26 AT_KEYWORDS([incremental rename rename02])
27
28 AT_TAR_CHECK([
29 AT_SORT_PREREQ
30 mkdir foo
31 genfile --file foo/file1
32 genfile --file foo/file2
33 mkdir foo/bar
34 genfile --file foo/bar/file.r
35 mkdir foo/bar/baz
36 genfile --file foo/bar/baz/file.z
37
38 sleep 1
39
40 echo "Creating base archive"
41 tar -g incr -cf arch.1 -v foo
42
43 mv foo/bar/baz foo
44
45 echo "Creating incremental archive"
46 tar -g incr -cf arch.2 -v foo
47
48 mv foo old
49
50 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
51 sort tmperr >&2
52
53 echo "Begin directory listing 1"
54 find foo | sort
55 echo "End directory listing 1"
56
57 tar xfgv arch.2 /dev/null --warning=no-timestamp
58 echo Begin directory listing 2
59 find foo | sort
60 echo End directory listing 2
61 ],
62 [0],
63 [Creating base archive
64 foo/
65 foo/bar/
66 foo/bar/baz/
67 foo/file1
68 foo/file2
69 foo/bar/file.r
70 foo/bar/baz/file.z
71 Creating incremental archive
72 foo/
73 foo/bar/
74 foo/baz/
75 Begin directory listing 1
76 foo
77 foo/bar
78 foo/bar/baz
79 foo/bar/baz/file.z
80 foo/bar/file.r
81 foo/file1
82 foo/file2
83 End directory listing 1
84 foo/
85 foo/bar/
86 foo/baz/
87 Begin directory listing 2
88 foo
89 foo/bar
90 foo/bar/file.r
91 foo/baz
92 foo/baz/file.z
93 foo/file1
94 foo/file2
95 End directory listing 2
96 ],
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'
101 ],
102 [],[],[gnu, oldgnu, posix])
103
104 AT_CLEANUP
105
106 # End of rename02.at