re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / T-recurse.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2015-2016 Free Software Foundation, Inc.
5
6 # This file is part of GNU tar.
7
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.
12
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.
17
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/>.
20
21 # Description: Test interaction of --recursion and --no-recursion options
22 # together with --files-from option.  This is complementary to recurs02.at test
23 # case. References:
24 # <alpine.LSU.2.11.1502201029580.29773@nerf60.vanv.qr>
25 # http://lists.gnu.org/archive/html/bug-tar/2015-06/msg00006.html
26
27 AT_SETUP([files-from & recurse: toggle])
28 AT_KEYWORDS([recurse T-recurse files-from])
29
30 AT_TAR_CHECK([
31 mkdir directory1 directory2
32 touch directory1/file directory2/file
33
34 AT_DATA([F1],[--no-recursion
35 directory1/
36 --recursion
37 directory2/
38 ])
39
40 AT_DATA([F2A],[directory1/
41 ])
42
43 AT_DATA([F2B],[directory2/
44 ])
45
46 a=archive
47 tar cf "$a" --files-from F1
48 tar tf "$a"
49
50 a=archive2
51 tar cf "$a" --no-recursion -T F2A --recursion -T F2B
52 tar tf "$a"
53 ],
54 [0],
55 [directory1/
56 directory2/
57 directory2/file
58 directory1/
59 directory2/
60 directory2/file
61 ])
62
63 AT_CLEANUP
64
65
66 AT_SETUP([toggle --recursion (not) from -T])
67 AT_KEYWORDS([recurse T-recurse T-recurse2 files-from])
68
69 AT_TAR_CHECK([
70 mkdir directory1 directory2
71 touch directory1/file directory2/file
72
73 AT_DATA([F1],[--no-recursion
74 directory1/
75 ])
76
77 AT_DATA([F2],[directory2/
78 ])
79
80 tar cf archive -T F1 --recursion -T F2
81 tar tf archive
82
83 ],
84 [0],
85 [directory1/
86 directory2/
87 directory2/file
88 ])
89
90 AT_CLEANUP