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
24AT_SETUP([renamed dirs in incrementals])
25AT_KEYWORDS([incremental rename rename01])
26
27AT_TAR_CHECK([
28AT_SORT_PREREQ
29
30mkdir foo
31genfile --file foo/file1
32genfile --file foo/file2
33mkdir foo/bar
34genfile --file foo/bar/file
35
36echo "Creating base archive"
37tar -g incr -cf arch.1 -v foo
38
39mv foo/bar foo/baz
40
41echo "Creating incremental archive"
42tar -g incr -cf arch.2 -v foo
43
44mv foo old
45
46tar xfg arch.1 /dev/null
47
48echo "Begin directory listing 1"
49find foo | sort 
50echo "End directory listing 1"
51
52tar xfg arch.2 /dev/null
53echo Begin directory listing 2
54find foo | sort
55echo End directory listing 2
56],
57[0],
58[Creating base archive
59foo/
60foo/bar/
61foo/file1
62foo/file2
63foo/bar/file
64Creating incremental archive
65foo/
66foo/baz/
67Begin directory listing 1
68foo
69foo/bar
70foo/bar/file
71foo/file1
72foo/file2
73End directory listing 1
74Begin directory listing 2
75foo
76foo/baz
77foo/baz/file
78foo/file1
79foo/file2
80End directory listing 2
81],
82[tar: foo/bar: Directory is new
83tar: foo/baz: Directory has been renamed from `foo/bar'
84],
85[],[],[gnu, oldgnu, posix])
86
87AT_CLEANUP
88
89# End of rename01.at
90