Fix exclusion of long file names when extracting from pax format archives.
[tar.git] / tests / xform-h.at
blob28de384f3eacdaf11df4db94214c63fd672b582a
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
3 # Test suite for GNU tar.
4 # Copyright (C) 2009 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, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 # 02110-1301, USA.
21 # When creating archives, tar 1.22 did not apply the --transform option
22 # to hard links.
24 # Reported by: Jose Miguel Goncalves <jose.goncalves@inov.pt>
25 # References:
26 #   <4A436D1D.4040408@inov.pt>
27 #   http://lists.gnu.org/archive/html/bug-tar/2009-06/msg00017.html
30 AT_SETUP([transforming hard links on create])
31 AT_KEYWORDS([transform xform xform-h])
33 m4_define([xform],[
34 echo "$1"
35 tar cf archive --transform="s,^basedir/,,$2" basedir/test basedir/test_link
36 tar tvf archive | sed -n 's/.*test_link link to //p'
39 AT_TAR_CHECK([
40 mkdir basedir
41 echo "hello" > basedir/test
42 ln basedir/test basedir/test_link
44 xform(Default transform scope)
45 xform(Transforming hard links,h)
46 xform(Not transforming hard links,H)
48 [0],
49 [Default transform scope
50 test
51 Transforming hard links
52 test
53 Not transforming hard links
54 basedir/test
57 AT_CLEANUP
59 # End of xform-h.at