]> git.cworth.org Git - tar/blobdiff - tests/multiv07.at
Imported Upstream version 1.23
[tar] / tests / multiv07.at
diff --git a/tests/multiv07.at b/tests/multiv07.at
new file mode 100644 (file)
index 0000000..ff965d6
--- /dev/null
@@ -0,0 +1,43 @@
+# Test suite for GNU tar.                             -*- Autotest -*-
+# Copyright (C) 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Description: When creating POSIX multivolume archives, tar may in
+# some cases write an extended header at the end of one volume, and 
+# the corresponding ustar header at the beginning of the next volume.
+# Such archives do not fully comply with the POSIX specs, but tar must
+# be able to read them anyway. This is what this script tests.
+#
+# See function try_new_volume, in file src/buffer.c near line 1227
+# for additional details.
+
+AT_SETUP([volumes split at an extended header])
+AT_KEYWORDS([multivolume multiv multiv07 xsplit])
+
+AT_CHECK([
+AT_XFAIL_IF(test -f $[]XFAILFILE)
+AT_TARBALL_PREREQ([xsplit-1.tar],[0e008c84c517e48fbf23ca6a7033cde6])
+AT_TARBALL_PREREQ([xsplit-2.tar],[03150b9852d285458f43734e9e0b9a45])
+
+cd $TEST_DATA_DIR
+tar -t -M -fxsplit-1.tar -fxsplit-2.tar
+],
+[0],
+[Archive volumes split at an extended header Volume 1
+foo
+bar
+])
+
+AT_CLEANUP