]> Dogcows Code - chaz/tar/blob - tests/rename02.at
Relicense under GPLv3
[chaz/tar] / tests / rename02.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2006, 2007 Free Software Foundation, Inc.
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
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 echo "Creating base archive"
38 tar -g incr -cf arch.1 -v foo
39
40 mv foo/bar/baz foo
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 2>tmperr
48 sort tmperr >&2
49
50 echo "Begin directory listing 1"
51 find foo | sort
52 echo "End directory listing 1"
53
54 tar xfgv arch.2 /dev/null
55 echo Begin directory listing 2
56 find foo | sort
57 echo End directory listing 2
58 ],
59 [0],
60 [Creating base archive
61 foo/
62 foo/bar/
63 foo/bar/baz/
64 foo/file1
65 foo/file2
66 foo/bar/file.r
67 foo/bar/baz/file.z
68 Creating incremental archive
69 foo/
70 foo/bar/
71 foo/baz/
72 Begin directory listing 1
73 foo
74 foo/bar
75 foo/bar/baz
76 foo/bar/baz/file.z
77 foo/bar/file.r
78 foo/file1
79 foo/file2
80 End directory listing 1
81 foo/
82 foo/bar/
83 foo/baz/
84 Begin directory listing 2
85 foo
86 foo/bar
87 foo/bar/file.r
88 foo/baz
89 foo/baz/file.z
90 foo/file1
91 foo/file2
92 End directory listing 2
93 ],
94 [tar: foo/bar: Directory is new
95 tar: foo/bar/baz: Directory is new
96 tar: foo/baz: Directory has been renamed from `foo/bar/baz'
97 ],
98 [],[],[gnu, oldgnu, posix])
99
100 AT_CLEANUP
101
102 # End of rename02.at
This page took 0.044918 seconds and 5 git commands to generate.