Fix the difflink test
[tar.git] / tests / rename05.at
blob92d2ae5a9bb916b8e4c3ca61a428f303fdffe751
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2008, 2013-2014, 2016-2017 Free Software Foundation, Inc.
6 # This file is part of GNU tar.
8 # GNU tar is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # GNU tar is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 # Description:  A continuation of rename04.at, that checks additionally if
22 # renamed subdirectories are restored correctly.
24 AT_SETUP([renamed subdirectories])
25 AT_KEYWORDS([incremental rename05 rename])
27 AT_TAR_CHECK([
28 AT_SORT_PREREQ
30 decho Creating directory structure
31 mkdir directory
32 mkdir directory/subdir
33 genfile --file=directory/file
35 decho Creating initial archive
36 tar -cf archive.1 -g db.1 directory
38 decho Renaming
39 mv directory/subdir directory/subdir.0
40 mv directory dir
42 decho Creating incremental archive
43 cp db.1 db.2
44 tar -cf archive.2 -g db.2 dir
46 mv dir orig
48 decho First restore
49 tar -xf archive.1 -g db.1 --warning=no-timestamp
50 find directory | sort
52 decho Second restore
53 tar -xf archive.2 -g db.2 --warning=no-timestamp
54 find dir | sort
56 [0],
57 [Creating directory structure
58 Creating initial archive
59 Renaming
60 Creating incremental archive
61 First restore
62 directory
63 directory/file
64 directory/subdir
65 Second restore
66 dir
67 dir/subdir.0
69 [Creating directory structure
70 Creating initial archive
71 Renaming
72 Creating incremental archive
73 First restore
74 Second restore
75 ],[],[],[gnu, oldgnu, posix])
77 AT_CLEANUP
79 # End of rename05.at