re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / rename01.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: Test basic handling of renamed directory in the incremental
23 # archives.
24
25 AT_SETUP([renamed dirs in incrementals])
26 AT_KEYWORDS([incremental rename rename01])
27
28 AT_TAR_CHECK([
29 AT_SORT_PREREQ
30
31 mkdir foo
32 genfile --file foo/file1
33 genfile --file foo/file2
34 mkdir foo/bar
35 genfile --file foo/bar/file
36
37 echo "Creating base archive"
38 tar -g incr -cf arch.1 -v foo
39
40 mv foo/bar foo/baz
41
42 echo "Creating incremental archive"
43 tar -g incr -cf arch.2 -v foo
44
45 mv foo old
46
47 tar xfg arch.1 /dev/null
48
49 echo "Begin directory listing 1"
50 find foo | sort
51 echo "End directory listing 1"
52
53 tar xfg arch.2 /dev/null
54 echo Begin directory listing 2
55 find foo | sort
56 echo End directory listing 2
57 ],
58 [0],
59 [Creating base archive
60 foo/
61 foo/bar/
62 foo/file1
63 foo/file2
64 foo/bar/file
65 Creating incremental archive
66 foo/
67 foo/baz/
68 Begin directory listing 1
69 foo
70 foo/bar
71 foo/bar/file
72 foo/file1
73 foo/file2
74 End directory listing 1
75 Begin directory listing 2
76 foo
77 foo/baz
78 foo/baz/file
79 foo/file1
80 foo/file2
81 End directory listing 2
82 ],
83 [tar: foo: Directory is new
84 tar: foo/bar: Directory is new
85 tar: foo/baz: Directory has been renamed from 'foo/bar'
86 ],
87 [],[],[gnu, oldgnu, posix])
88
89 AT_CLEANUP
90
91 # End of rename01.at