]> Dogcows Code - chaz/tar/blob - tests/long01.at
Complete the reference
[chaz/tar] / tests / long01.at
1 # Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3 # Test suite for GNU tar.
4 # Copyright (C) 2005 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 2, 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, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
20
21 # In GNU format, when extracting or listing a file member with a name
22 # whose length is divisible by block size (512) tar used to read an
23 # extra block of data. In consequence the following file was not extracted.
24 # Reported by Josef Bauer
25 # References: <200501122145.j0CLjGhl006070@uhu.mchp.siemens.de>
26 # http://lists.gnu.org/archive/html/bug-tar/2005-01/msg00038.html
27
28 AT_SETUP([long file names divisible by block size])
29 AT_KEYWORDS([long512])
30
31 dnl Create a directory structure with maximum diractory name length 512-16
32 m4_define([NAME],[0123456789abcde])
33 m4_define([FULLNAME],NAME)
34 m4_for([N],0,29,,[m4_define([FULLNAME],FULLNAME/NAME)])
35
36 # Create a directory from [FULLNAME] with a file NAME at the deepest
37 # level. The full length of the resulting file name is 512
38 # NOTE: It is important to use a *file* in this test, since directory
39 # names always receive a trailing slash in tar.
40 mkhier() {
41 (for name in `echo FULLNAME | tr '/' ' '`
42 do
43 mkdir $name
44 cd $name
45 done
46 cat /dev/null > NAME)
47 }
48
49 AT_TAR_CHECK([
50 mkhier
51 echo test > endfile
52
53 tar cf archive FULLNAME/NAME endfile
54 tar tf archive],
55 [0],
56 [FULLNAME/NAME
57 endfile
58 ],
59 [],[],[],[gnu,oldgnu])
60
61 AT_CLEANUP
62
This page took 0.035013 seconds and 5 git commands to generate.