Use stdopen from gnulib
[tar.git] / tests / comperr.at
blobc6e17854749af8bb4c88eda16d1e6ce6717facf1
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 # Test suite for GNU tar.
3 # Copyright 2015-2021 Free Software Foundation, Inc.
5 # GNU tar is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # GNU tar is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 AT_SETUP([compressor program failure])
19 AT_KEYWORDS([compress comperr])
21 # Description: If the --use-compress-program fails, then it is unsafe
22 # to assume that the created archive is OK.  Tar should fail with a
23 # prominent error message.
24 # Reported by: Ole Tange <tange@gnu.org>
25 # References: <CA+4vN7wLZ-+LK1t7WMkM_b9f3mV9JTnSuPamPn2ciX5PTN=9Xw@mail.gmail.com>,
26 #        http://lists.gnu.org/archive/html/bug-tar/2015-03/msg00002.html
28 AT_TAR_CHECK([
29 tar --use-compress-program false -cf a.tar . 2>err
30 rc=$?
31 sed -n '$p' err
32 exit $rc
34 [2],
35 [tar: Error is not recoverable: exiting now
38 AT_CLEANUP