Add basic suuport for extended attributes.
[tar.git] / tests / extrac18.at
blob8b42ef7e7d85e1d98a45572da7220f5d1bc88aad
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2011 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
9 # any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 # Description: Check the functionality of the --keep-old-files option.
20 # It should report an error and cause tar to exit with status 2.
22 # There was a regression in versions 1.23 to 1.26 inclusive, where
23 # this option silently skipped such files.
24 # Reported by: Doug McLaren <dougmc@frenzied.us>,
25 #              Gary Partis <gary@partis.co.uk>,
26 #              Jim Meyering <jim@meyering.net>
27 #              
28 # References: <20111117045433.GA8245@algol.frenzied.us>,
29 #             <4F3D824717847C4487F77228F83329A3514CBB@server.Partis.local>,
30 #             <87wrar6zzz.fsf@rho.meyering.net>
32 AT_SETUP([keep-old-files])
33 AT_KEYWORDS([extract extrac18 old-files keep-old-files])
35 AT_TAR_CHECK([
36 mkdir dir
37 cd dir
38 echo 'Old file a' > a
39 echo 'Old file b' > b
41 tar cf ../archive .
43 rm b
44 echo 'File a' > a
46 tar -x -k -f ../archive
47 echo status=$?
49 cat a
51 [0],
52 [status=2
53 File a
55 [tar: ./a: Cannot open: File exists
56 tar: Exiting with failure status due to previous errors
59 AT_CLEANUP