1# Process this file with autom4te to create testsuite. -*- Autotest -*-
2
3# Test suite for GNU tar.
4# Copyright (C) 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA
19# 02110-1301, USA.
20
21# Up to version 1.15.91 tar was unable to recognize all volumes
22# given after an aout-of-sync volume.
23# Reported by: Joerg Weilbier <gnu@weilbier.net>
24# References: <200610011952.29880.gnu@weilbier.net>
25
26AT_SETUP([Restoring after an out of sync folume])
27AT_KEYWORDS([multivolume multiv multiv05 sync])
28m4_define([FILELIST],[jeden,dwa,trzy,cztery,piec,szesc])
29
30AT_TAR_CHECK([
31exec <&-
32
33m4_foreach([f],
34  [FILELIST],
35  [genfile --length 250k --file f
36])
37
38echo Creating archive
39tar -c -M -L 502 -f a.tar -f b.tar -f c.tar m4_foreach([f],[FILELIST],f )
40echo separator
41mkdir bak
42mv m4_foreach([f],[FILELIST],f )bak
43tar -vxM -f a.tar -f c.tar -f b.tar -f c.tar 
44m4_foreach([f],
45  [FILELIST],
46  [echo Diffing f
47   cmp bak/f f || exit 1
48])],
49[0],
50[Creating archive
51separator]
52m4_foreach([file],
53  [FILELIST],
54  [file
55])dnl
56m4_foreach([file],
57  [FILELIST],
58  [Diffing file
59])dnl
60,
61[tar: `trzy' is not continued on this volume
62],[],[], [gnu])
63
64AT_CLEANUP
65
66
67
68