]> Dogcows Code - chaz/tar/blob - tests/exclude05.at
Update for new exclude module from gnulib. Add testcases by Phil Proudman.
[chaz/tar] / tests / exclude05.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Copyright (C) 2009 Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
7 # any later version.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 # Test the functioning of many items in an exclude list (should run quickly)
18
19 AT_SETUP([exclude: lots of excludes])
20 AT_KEYWORDS([exclude exclude05])
21
22 AT_TAR_CHECK([
23 AT_SORT_PREREQ
24
25 rm -rf testdir exclfile
26 mkdir -p testdir
27 `awk 'BEGIN {for (i=9; i < 100; ++i ) { print > "testdir/file" i; }}'`
28
29 `awk 'BEGIN {for (i=1000000; i >= 12; --i ) { print "testdir/file" i > "exclfile"; }}'`
30
31 tar cf archive --anchored --exclude-from=exclfile \
32 testdir
33 tar tf archive | sort
34
35 echo "NEXT"
36 tar cf archive --exclude-from=exclfile \
37 testdir
38 tar tf archive | sort
39
40 rm -rf testdir exclfile
41
42 ],
43 [0],
44 [testdir/
45 testdir/file10
46 testdir/file11
47 testdir/file9
48 NEXT
49 testdir/
50 testdir/file10
51 testdir/file11
52 testdir/file9
53 ])
54
55 AT_CLEANUP
This page took 0.03702 seconds and 5 git commands to generate.