re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / incr09.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2013-2014, 2016 Free Software Foundation, Inc.
4 #
5 # GNU tar is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # GNU tar is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 # Description: For some intermediate versions of tar 1.26.90,
19 # tar would fail to correctly cannonicalize archive member names
20 # in incremental mode if there was a -C options with an absolute path
21 # on the command line without any archive members specified within that
22 # directory. (In that case, the canonical name generated for
23 # members specified after later -C options wouldn't correctly reflect the
24 # previous absolute path.)
25
26 AT_SETUP([incremental with alternating -C])
27 AT_KEYWORDS([incremental create incr09])
28
29 AT_TAR_CHECK([
30 AT_CHECK_TIMESTAMP
31 AT_SORT_PREREQ
32 mkdir foo bar middle
33 echo foo/foo_file > foo/foo_file
34 echo bar/bar_file > bar/bar_file
35 echo middle/file > middle/middle_file
36 decho A
37 tar -cvf foo.tar --incremental -C foo . -C `pwd` middle  -C bar .
38
39 rm foo.tar
40 >toplevel_file
41 decho B
42 tar -cvf foo.tar --incremental -C foo . -C `pwd` toplevel_file  -C bar .
43 ],
44 [0],
45 [A
46 ./
47 ./
48 middle/
49 ./bar_file
50 ./foo_file
51 middle/middle_file
52 B
53 ./
54 ./
55 toplevel_file
56 ./bar_file
57 ./foo_file
58 ],
59 [A
60 tar: .: Directory is new
61 tar: middle: Directory is new
62 tar: .: Directory is new
63 B
64 tar: .: Directory is new
65 tar: .: Directory is new
66 ],[],[],[gnu])
67
68 AT_CLEANUP