]> Dogcows Code - chaz/tar/blob - tests/xattr05.at
Allow to store/extract '=' character in xattr keyword
[chaz/tar] / tests / xattr05.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2 #
3 # Test suite for GNU tar.
4 # Copyright (C) 2012 Free Software Foundation, Inc.
5 #
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.
10 #
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.
15 #
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/>.
18 #
19 # Test description: Test for archiving/extracting of extended attributes
20 # having the '=' character in its keyword.
21 #
22 # Relevant mailing list thread:
23 #
24 # http://lists.gnu.org/archive/html/bug-tar/2012-10/msg00017.html
25
26 AT_SETUP([xattrs: keywords with '=' and '%'])
27 AT_KEYWORDS([xattrs xattr05])
28
29 AT_TAR_CHECK([
30 AT_XATTRS_PREREQ
31
32 mkdir dir
33 mkdir output
34 genfile --file dir/file
35
36 setfattr -n user.=NAME%3D= -v value dir/file
37 getfattr -d dir/file | grep -v '# ' > before
38
39 # archive whole directory including binary xattrs
40 tar --xattrs -cf archive.tar -C dir .
41
42 tar --xattrs -xf archive.tar -C output
43 getfattr -d output/file | grep -v '# ' > after
44 diff before after
45 ],
46 [0],
47 [])
48
49 AT_CLEANUP
This page took 0.042668 seconds and 5 git commands to generate.