1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright 2011, 2013 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: Check the functionality of the --keep-old-files option.
22 # It should report an error and cause tar to exit with status 2.
24 # There was a regression in versions 1.23 to 1.26 inclusive, where
25 # this option silently skipped such files.
26 # Reported by: Doug McLaren <dougmc@frenzied.us>,
27 # Gary Partis <gary@partis.co.uk>,
28 # Jim Meyering <jim@meyering.net>
30 # References: <20111117045433.GA8245@algol.frenzied.us>,
31 # <4F3D824717847C4487F77228F83329A3514CBB@server.Partis.local>,
32 # <87wrar6zzz.fsf@rho.meyering.net>
34 AT_SETUP([keep-old-files])
35 AT_KEYWORDS([extract extrac18 old-files keep-old-files])
48 tar -x -k -f ../archive
57 [tar: ./a: Cannot open: File exists
58 tar: Exiting with failure status due to previous errors