]> Dogcows Code - chaz/tar/blob - tests/exclude.at
Update
[chaz/tar] / tests / exclude.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2007 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 # Test the functioning of --exclude-caches and --exclude-tag option families
22
23 AT_SETUP([exclude])
24 AT_KEYWORDS([exclude])
25
26 AT_TAR_CHECK([
27 mkdir dir
28 echo blues > dir/blues
29 echo jazz > dir/jazz
30 mkdir dir/folk
31 echo tagfile > dir/folk/tagfile
32 echo sanjuan > dir/folk/sanjuan
33 mkdir dir/rock
34 echo "Signature: 8a477f597d28d172789f06886806bc55" > dir/rock/CACHEDIR.TAG
35 echo "test" > dir/rock/file
36
37 for option in exclude-caches exclude-caches-under exclude-caches-all
38 do
39 echo OPTION $option
40 tar -cf archive.tar --$option -v dir 2>err
41 cat err
42 echo ARCHIVE
43 tar tf archive.tar
44 done
45
46 for option in exclude-tag exclude-tag-under exclude-tag-all
47 do
48 echo OPTION $option
49 tar -cf archive.tar --${option}=tagfile -v dir 2>err
50 cat err
51 echo ARCHIVE
52 tar tf archive.tar
53 done
54 ],
55 [0],
56 [OPTION exclude-caches
57 dir/
58 dir/blues
59 dir/jazz
60 dir/folk/
61 dir/folk/tagfile
62 dir/folk/sanjuan
63 dir/rock/
64 dir/rock/CACHEDIR.TAG
65 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
66 ARCHIVE
67 dir/
68 dir/blues
69 dir/jazz
70 dir/folk/
71 dir/folk/tagfile
72 dir/folk/sanjuan
73 dir/rock/
74 dir/rock/CACHEDIR.TAG
75 OPTION exclude-caches-under
76 dir/
77 dir/blues
78 dir/jazz
79 dir/folk/
80 dir/folk/tagfile
81 dir/folk/sanjuan
82 dir/rock/
83 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; contents not dumped
84 ARCHIVE
85 dir/
86 dir/blues
87 dir/jazz
88 dir/folk/
89 dir/folk/tagfile
90 dir/folk/sanjuan
91 dir/rock/
92 OPTION exclude-caches-all
93 dir/
94 dir/blues
95 dir/jazz
96 dir/folk/
97 dir/folk/tagfile
98 dir/folk/sanjuan
99 tar: dir/rock/: contains a cache directory tag CACHEDIR.TAG; directory not dumped
100 ARCHIVE
101 dir/
102 dir/blues
103 dir/jazz
104 dir/folk/
105 dir/folk/tagfile
106 dir/folk/sanjuan
107 OPTION exclude-tag
108 dir/
109 dir/blues
110 dir/jazz
111 dir/folk/
112 dir/folk/tagfile
113 dir/rock/
114 dir/rock/CACHEDIR.TAG
115 dir/rock/file
116 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
117 ARCHIVE
118 dir/
119 dir/blues
120 dir/jazz
121 dir/folk/
122 dir/folk/tagfile
123 dir/rock/
124 dir/rock/CACHEDIR.TAG
125 dir/rock/file
126 OPTION exclude-tag-under
127 dir/
128 dir/blues
129 dir/jazz
130 dir/folk/
131 dir/rock/
132 dir/rock/CACHEDIR.TAG
133 dir/rock/file
134 tar: dir/folk/: contains a cache directory tag tagfile; contents not dumped
135 ARCHIVE
136 dir/
137 dir/blues
138 dir/jazz
139 dir/folk/
140 dir/rock/
141 dir/rock/CACHEDIR.TAG
142 dir/rock/file
143 OPTION exclude-tag-all
144 dir/
145 dir/blues
146 dir/jazz
147 dir/rock/
148 dir/rock/CACHEDIR.TAG
149 dir/rock/file
150 tar: dir/folk/: contains a cache directory tag tagfile; directory not dumped
151 ARCHIVE
152 dir/
153 dir/blues
154 dir/jazz
155 dir/rock/
156 dir/rock/CACHEDIR.TAG
157 dir/rock/file
158 ],
159 [],[],[],[ustar])
160
161 AT_CLEANUP
This page took 0.041343 seconds and 4 git commands to generate.