]> git.cworth.org Git - tar/blob - tests/exclude04.at
upstream: Fix extraction of device nodes.
[tar] / tests / exclude04.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 AT_SETUP([exclude: case insensitive])
18 AT_KEYWORDS([exclude exclude04])
19
20 AT_TAR_CHECK([
21 AT_SORT_PREREQ
22
23 rm -rf testdir
24 mkdir -p testdir/dir
25 touch testdir/file1
26 touch testdir/file2
27 touch testdir/file3
28 touch testdir/file4
29 touch testdir/dir/File1
30 touch testdir/dir/File2
31 touch testdir/dir/File3
32 touch testdir/dir/File4
33
34 tar cf archive --exclude=FILE2 \
35                --exclude=file1 \
36                --ignore-case \
37                --exclude=file3 \
38                --no-ignore-case \
39                --exclude=FILE2 \
40                --exclude=file4 \
41                testdir
42 tar tf archive | sort
43
44 echo "SUB 1"
45 tar cf archive testdir
46 tar t --wildcards --wildcards-match-slash '*File2' -f archive | sort
47
48 echo "SUB 2"
49 tar t --wildcards --wildcards-match-slash --ignore-case '*File2' -f archive | sort
50
51 echo "SUB 3"
52 tar t --wildcards --wildcards-match-slash --no-ignore-case '*File2' -f archive | sort
53
54 rm -rf testdir
55
56 ],
57 [0],
58 [testdir/
59 testdir/dir/
60 testdir/dir/File1
61 testdir/dir/File2
62 testdir/dir/File4
63 testdir/file2
64 SUB 1
65 testdir/dir/File2
66 SUB 2
67 testdir/dir/File2
68 testdir/file2
69 SUB 3
70 testdir/dir/File2
71 ])
72
73 AT_CLEANUP