]> Dogcows Code - chaz/tar/blob - tests/exclude13.at
Options to control option handling in file lists.
[chaz/tar] / tests / exclude13.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 #
3 # Test suite for GNU tar.
4 # Copyright 2013-2014 Free Software Foundation, Inc.
5
6 # This file is part of GNU tar.
7
8 # GNU tar is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
12
13 # GNU tar is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # The --exclude-tag options interacted incorrectly with --listed-incremental
22 # since their very inception. The testcases exclude08 through exclude16
23 # verify that --exclude-tag operates consistently whether or not
24 # --listed-incremental option is given.
25 #
26 # This testcase verifies whether the --exclude-tag-under option works
27 # as expected when used in conjunction with --listed-incremental.
28 # If the exclusion tag is created after the level 0 dump, the level
29 # 1 dump must skip the affected subdirectory and any previously-included
30 # files within it, including the tag file, but preserve the directory
31 # itself.
32 #
33 # Reported-by: Nathan Stratton Treadway <nathanst+bugtar@ontko.com>
34 # Last-Affected-Version: 1.26
35 # References: <20120528140419.GT2654@shire.ontko.com>,
36 # <20130311210006.GA3732@shire.ontko.com>,
37 # http://lists.gnu.org/archive/html/bug-tar/2012-06/msg00013.html
38
39 AT_SETUP([--exclude-tag-under option in incremental pass])
40 AT_KEYWORDS([exclude exclude-tag exclude-tag-under listed incremental exclude13])
41
42 AT_TAR_CHECK([
43 AT_SORT_PREREQ
44 mkexcltest etest
45 rm etest/subdir/excludeme
46 decho "# Level 0"
47 tar -c -f etest-0.tar --exclude-tag-under=excludeme --listed=snar-0 -v etest | sort
48 touch etest/subdir/excludeme
49 touch etest/subdir/otherfile
50
51 decho "# Level 1"
52 cp snar-0 snar-1
53 tar -c -f etest-1.tar --exclude-tag-under=excludeme --listed=snar-1 -v etest | sort
54 ],
55 [0],
56 [# Level 0
57 etest/
58 etest/subdir/
59 etest/subdir/subdir-file
60 etest/top-level-file
61 # Level 1
62 etest/
63 etest/subdir/
64 ],
65 [# Level 0
66 tar: etest: Directory is new
67 tar: etest/subdir: Directory is new
68 # Level 1
69 tar: etest/subdir: contains a cache directory tag excludeme; contents not dumped
70 ],[],[],[gnu])
71
72 AT_CLEANUP
73
This page took 0.037085 seconds and 5 git commands to generate.