]> Dogcows Code - chaz/tar/blob - tests/rename02.at
Update copyright years.
[chaz/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 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: Incremental archives should be able to handle directories
22 # moved between directory hierarchies.
23
24 AT_SETUP([move between hierarchies])
25 AT_KEYWORDS([incremental rename rename02])
26
27 AT_TAR_CHECK([
28 AT_SORT_PREREQ
29 mkdir foo
30 genfile --file foo/file1
31 genfile --file foo/file2
32 mkdir foo/bar
33 genfile --file foo/bar/file.r
34 mkdir foo/bar/baz
35 genfile --file foo/bar/baz/file.z
36
37 sleep 1
38
39 echo "Creating base archive"
40 tar -g incr -cf arch.1 -v foo
41
42 mv foo/bar/baz foo
43
44 echo "Creating incremental archive"
45 tar -g incr -cf arch.2 -v foo
46
47 mv foo old
48
49 tar xfg arch.1 /dev/null --warning=no-timestamp 2>tmperr
50 sort tmperr >&2
51
52 echo "Begin directory listing 1"
53 find foo | sort
54 echo "End directory listing 1"
55
56 tar xfgv arch.2 /dev/null --warning=no-timestamp
57 echo Begin directory listing 2
58 find foo | sort
59 echo End directory listing 2
60 ],
61 [0],
62 [Creating base archive
63 foo/
64 foo/bar/
65 foo/bar/baz/
66 foo/file1
67 foo/file2
68 foo/bar/file.r
69 foo/bar/baz/file.z
70 Creating incremental archive
71 foo/
72 foo/bar/
73 foo/baz/
74 Begin directory listing 1
75 foo
76 foo/bar
77 foo/bar/baz
78 foo/bar/baz/file.z
79 foo/bar/file.r
80 foo/file1
81 foo/file2
82 End directory listing 1
83 foo/
84 foo/bar/
85 foo/baz/
86 Begin directory listing 2
87 foo
88 foo/bar
89 foo/bar/file.r
90 foo/baz
91 foo/baz/file.z
92 foo/file1
93 foo/file2
94 End directory listing 2
95 ],
96 [tar: foo: Directory is new
97 tar: foo/bar: Directory is new
98 tar: foo/bar/baz: Directory is new
99 tar: foo/baz: Directory has been renamed from 'foo/bar/baz'
100 ],
101 [],[],[gnu, oldgnu, posix])
102
103 AT_CLEANUP
104
105 # End of rename02.at
This page took 0.032141 seconds and 4 git commands to generate.