Debian Codegraph @

tests/update04.at

raw
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2016-2023 Free Software Foundation, Inc.
4 #
5 # This file is part of GNU tar.
6 #
7 # GNU tar is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # GNU tar is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 AT_SETUP([update with wildcards])
21 AT_KEYWORDS([update update04 wildcards])
22
23 AT_TAR_CHECK([
24 genfile --file file.a
25 genfile --file file.b
26 genfile --file file.c
27 echo Create
28 tar cf archive ./file.*
29 sleep 1
30 echo "update" > file.b
31 echo First update
32 tar ufv archive --wildcards './file.*'
33
34 echo "Second update"
35 tar ufv archive --wildcards './file.*'
36
37 echo "Non-matching pattern"
38 tar ufv archive --wildcards './file.*' './foo.*'
39 echo $?
40 ],
41 [0],
42 [Create
43 First update
44 ./file.b
45 Second update
46 Non-matching pattern
47 2
48 ],
49 [tar: ./foo.*: Not found in archive
50 tar: Exiting with failure status due to previous errors
51 ])
52
53 AT_CLEANUP
54
55
56