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