]> Dogcows Code - chaz/tar/blob - tests/exclude05.at
Update copyright years.
[chaz/tar] / tests / exclude05.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Copyright 2009-2010, 2013-2014 Free Software Foundation, Inc.
3
4 # This file is part of GNU tar.
5
6 # GNU tar 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 of the License, or
9 # (at your option) any later version.
10
11 # GNU tar 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, see <http://www.gnu.org/licenses/>.
18
19 # Test the functioning of many items in an exclude list (should run quickly)
20
21 AT_SETUP([exclude: lots of excludes])
22 AT_KEYWORDS([exclude exclude05])
23
24 AT_TAR_CHECK([
25 AT_SORT_PREREQ
26
27 rm -rf testdir exclfile
28 mkdir -p testdir
29 awk 'BEGIN {for (i=9; i < 100; ++i ) { print "testdir/file" i; }}' < /dev/null | \
30 while read name
31 do
32 genfile --file $name
33 done
34
35 awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i }}' < /dev/null > exclfile
36
37 tar cf archive --anchored --exclude-from=exclfile \
38 testdir
39 tar tf archive | sort
40
41 echo "NEXT"
42 tar cf archive --exclude-from=exclfile \
43 testdir
44 tar tf archive | sort
45
46 rm -rf testdir exclfile
47
48 ],
49 [0],
50 [testdir/
51 testdir/file10
52 testdir/file11
53 testdir/file9
54 NEXT
55 testdir/
56 testdir/file10
57 testdir/file11
58 testdir/file9
59 ])
60
61 AT_CLEANUP
This page took 0.036149 seconds and 4 git commands to generate.