]> Dogcows Code - chaz/tar/blob - tests/rename01.at
New testcase
[chaz/tar] / tests / rename01.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: 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 mkdir foo
29 genfile --file foo/file1
30 genfile --file foo/file2
31 mkdir foo/bar
32 genfile --file foo/bar/file
33
34 echo "Creating base archive"
35 tar -g incr -cf arch.1 -v foo
36
37 mv foo/bar foo/baz
38
39 echo "Creating incremental archive"
40 tar -g incr -cf arch.2 -v foo
41
42 mv foo old
43
44 tar xfg arch.1 /dev/null
45
46 echo "Begin directory listing 1"
47 find foo | sort
48 echo "End directory listing 1"
49
50 tar xfg arch.2 /dev/null
51 echo Begin directory listing 2
52 find foo | sort
53 echo End directory listing 2
54 ],
55 [0],
56 [Creating base archive
57 foo/
58 foo/bar/
59 foo/file1
60 foo/file2
61 foo/bar/file
62 Creating incremental archive
63 foo/
64 foo/baz/
65 Begin directory listing 1
66 foo
67 foo/bar
68 foo/bar/file
69 foo/file1
70 foo/file2
71 End directory listing 1
72 Begin directory listing 2
73 foo
74 foo/baz
75 foo/baz/file
76 foo/file1
77 foo/file2
78 End directory listing 2
79 ],
80 [tar: foo/bar: Directory is new
81 tar: foo/baz: Directory has been renamed from `foo/bar'
82 ],
83 [],[],[gnu, oldgnu, posix])
84
85 AT_CLEANUP
86
87 # End of rename01.at
This page took 0.039539 seconds and 5 git commands to generate.