]> Dogcows Code - chaz/tar/blob - tests/rename02.at
New testcase
[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 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 2, 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 mkdir foo
29 genfile --file foo/file1
30 genfile --file foo/file2
31 mkdir foo/bar
32 genfile --file foo/bar/file.r
33 mkdir foo/bar/baz
34 genfile --file foo/bar/baz/file.z
35
36 echo "Creating base archive"
37 tar -g incr -cf arch.1 -v foo
38
39 mv foo/bar/baz foo
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 2>tmperr
47 sort tmperr >&2
48
49 echo "Begin directory listing 1"
50 find foo | sort
51 echo "End directory listing 1"
52
53 tar xfgv 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/bar/baz/
63 foo/file1
64 foo/file2
65 foo/bar/file.r
66 foo/bar/baz/file.z
67 Creating incremental archive
68 foo/
69 foo/bar/
70 foo/baz/
71 Begin directory listing 1
72 foo
73 foo/bar
74 foo/bar/baz
75 foo/bar/baz/file.z
76 foo/bar/file.r
77 foo/file1
78 foo/file2
79 End directory listing 1
80 foo/
81 foo/bar/
82 foo/baz/
83 Begin directory listing 2
84 foo
85 foo/bar
86 foo/bar/file.r
87 foo/baz
88 foo/baz/file.z
89 foo/file1
90 foo/file2
91 End directory listing 2
92 ],
93 [tar: foo/bar: Directory is new
94 tar: foo/bar/baz: Directory is new
95 tar: foo/baz: Directory has been renamed from `foo/bar/baz'
96 ],
97 [],[],[gnu, oldgnu, posix])
98
99 AT_CLEANUP
100
101 # End of rename02.at
This page took 0.051778 seconds and 5 git commands to generate.