1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2006 Free Software Foundation, Inc.
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)
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.
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
21 # Description: Handling of cyclic renames in incremental archives.
23 AT_SETUP([cyclic renames])
24 AT_KEYWORDS([incremental rename rename03 cyclic-rename])
30 genfile --file foo/file1
31 genfile --file foo/file2
34 genfile --file foo/a/filea
37 genfile --file foo/b/fileb
40 genfile --file foo/c/filec
44 tar -g incr -cf arch.1 -v foo 2>tmperr
47 # Shuffle directories:
55 echo "Second dump" >&2
56 tar -g incr -cf arch.2 -v foo 2>tmperr
59 tar xfg arch.1 /dev/null
61 echo "Begin directory listing 1"
63 echo "End directory listing 1"
65 tar xfgv arch.2 /dev/null
66 echo Begin directory listing 2
68 echo End directory listing 2
86 Begin directory listing 1
96 End directory listing 1
101 Begin directory listing 2
111 End directory listing 2
114 tar: foo/a: Directory is new
115 tar: foo/b: Directory is new
116 tar: foo/c: Directory is new
118 tar: foo/a: Directory has been renamed from `foo/c'
119 tar: foo/b: Directory has been renamed from `foo/a'
120 tar: foo/c: Directory has been renamed from `foo/b'
122 [],[],[gnu, oldgnu, posix])