]> Dogcows Code - chaz/tar/blob - tests/rename01.at
Update copyright years.
[chaz/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 Free Software Foundation, Inc.
5
6 # This file is part of GNU tar.
7
8 # GNU tar is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
12
13 # GNU tar is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # Description: Test basic handling of renamed directory in the incremental
22 # archives.
23
24 AT_SETUP([renamed dirs in incrementals])
25 AT_KEYWORDS([incremental rename rename01])
26
27 AT_TAR_CHECK([
28 AT_SORT_PREREQ
29
30 mkdir foo
31 genfile --file foo/file1
32 genfile --file foo/file2
33 mkdir foo/bar
34 genfile --file foo/bar/file
35
36 echo "Creating base archive"
37 tar -g incr -cf arch.1 -v foo
38
39 mv foo/bar foo/baz
40
41 echo "Creating incremental archive"
42 tar -g incr -cf arch.2 -v foo
43
44 mv foo old
45
46 tar xfg arch.1 /dev/null
47
48 echo "Begin directory listing 1"
49 find foo | sort
50 echo "End directory listing 1"
51
52 tar xfg arch.2 /dev/null
53 echo Begin directory listing 2
54 find foo | sort
55 echo End directory listing 2
56 ],
57 [0],
58 [Creating base archive
59 foo/
60 foo/bar/
61 foo/file1
62 foo/file2
63 foo/bar/file
64 Creating incremental archive
65 foo/
66 foo/baz/
67 Begin directory listing 1
68 foo
69 foo/bar
70 foo/bar/file
71 foo/file1
72 foo/file2
73 End directory listing 1
74 Begin directory listing 2
75 foo
76 foo/baz
77 foo/baz/file
78 foo/file1
79 foo/file2
80 End directory listing 2
81 ],
82 [tar: foo: Directory is new
83 tar: foo/bar: Directory is new
84 tar: foo/baz: Directory has been renamed from 'foo/bar'
85 ],
86 [],[],[gnu, oldgnu, posix])
87
88 AT_CLEANUP
89
90 # End of rename01.at
This page took 0.034091 seconds and 4 git commands to generate.