]> Dogcows Code - chaz/tar/blob - tests/xform-h.at
6a011692877f3228f3d1484711e80eb447a3b706
[chaz/tar] / tests / xform-h.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright 2009-2010, 2013 Free Software Foundation, Inc.
5
6 # This file is part of GNU tar.
7
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.
12
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.
17
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/>.
20
21 # When creating archives, tar 1.22 did not apply the --transform option
22 # to hard links.
23 #
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
28 #
29
30 AT_SETUP([transforming hard links on create])
31 AT_KEYWORDS([transform xform xform-h])
32
33 m4_pushdef([xformtest],[
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'
37 ])
38
39 AT_TAR_CHECK([
40 mkdir basedir
41 echo "hello" > basedir/test
42 ln basedir/test basedir/test_link
43
44 xformtest(Default transform scope)
45 xformtest(Transforming hard links,h)
46 xformtest(Not transforming hard links,H)
47 ],
48 [0],
49 [Default transform scope
50 test
51 Transforming hard links
52 test
53 Not transforming hard links
54 basedir/test
55 ])
56
57 m4_popdef([xformtest])
58
59 AT_CLEANUP
60
61 # End of xform-h.at
This page took 0.031596 seconds and 3 git commands to generate.