]> Dogcows Code - chaz/tar/blob - tests/label03.at
Update copyright years.
[chaz/tar] / tests / label03.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2010, 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 # Description: Test the functionality of the --test-label option.
22 # In versions up to 1.23 it did not match the documentation. This
23 # test case follows the examples from "9.7 Including a Label in the Archive".
24 # References: <15929_1268069389_4B95340D_15929_35_1_D621E31C29598A43AF7B4BBD30CCDDFD0838294A@fr0-mailmb04.res.airbus.corp>
25 #
26
27 AT_SETUP([test-label option])
28 AT_KEYWORDS([label label03 test-label])
29
30 AT_TAR_CHECK([
31 exec <&-
32 genfile --file file
33 tar -c --label='iamalabel' --file iamanarchive file
34 tar -c --file unlabeled.tar file
35 decho "# Display label"
36 tar --test-label --file=iamanarchive; echo $?
37 decho "# Display label: unlabeled"
38 tar --test-label --file=unlabeled.tar; echo $?
39 decho "# Test label: success"
40 tar --test-label --file=iamanarchive 'iamalabel'; echo $?
41 decho "# Test label: failure"
42 tar --test-label --file=iamanarchive 'amalabel'; echo $?
43 decho "# Test label: unlabeled"
44 tar --test-label --file=unlabeled.tar 'amalabel'; echo $?
45 decho "# Test label, verbose: success"
46 tar --test-label --verbose --file=iamanarchive 'iamalabel'; echo $?
47 decho "# Test label, verbose: failure"
48 tar --test-label --verbose --file=iamanarchive 'amalabel'; echo $?
49 decho "# Test label: multiple arguments"
50 tar --test-label --file=iamanarchive a iamalabel b; echo $?
51 decho "# Test label: wildcards"
52 tar --test-label --file=iamanarchive --wildcards '*label'; echo $?
53 ],
54 [0],
55 [# Display label
56 iamalabel
57 0
58 # Display label: unlabeled
59 0
60 # Test label: success
61 0
62 # Test label: failure
63 1
64 # Test label: unlabeled
65 1
66 # Test label, verbose: success
67 iamalabel
68 0
69 # Test label, verbose: failure
70 iamalabel
71 1
72 # Test label: multiple arguments
73 0
74 # Test label: wildcards
75 0
76 ],
77 [# Display label
78 # Display label: unlabeled
79 # Test label: success
80 # Test label: failure
81 # Test label: unlabeled
82 # Test label, verbose: success
83 # Test label, verbose: failure
84 tar: Archive label mismatch
85 # Test label: multiple arguments
86 # Test label: wildcards
87 ],[],[],[gnu,oldgnu,posix])
88
89 AT_CLEANUP
This page took 0.03138 seconds and 4 git commands to generate.