Fix the difflink test
[tar.git] / tests / label03.at
blobd698e3bd5cbaa80ed597b2d5b1f543bb7fa3fa98
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2010, 2013-2014, 2016-2017 Free Software Foundation, Inc.
6 # This file is part of GNU tar.
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.
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.
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/>.
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>
27 AT_SETUP([test-label option])
28 AT_KEYWORDS([label label03 test-label])
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 $?
54 [0],
55 [# Display label
56 iamalabel
58 # Display label: unlabeled
60 # Test label: success
62 # Test label: failure
64 # Test label: unlabeled
66 # Test label, verbose: success
67 iamalabel
69 # Test label, verbose: failure
70 iamalabel
72 # Test label: multiple arguments
74 # Test label: wildcards
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])
89 AT_CLEANUP