]> Dogcows Code - chaz/tar/commitdiff
Added new tests
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 4 Apr 2004 09:24:44 +0000 (09:24 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 4 Apr 2004 09:24:44 +0000 (09:24 +0000)
tests/Makefile.am
tests/multiv02.sh [new file with mode: 0755]
tests/sparse01.sh [new file with mode: 0755]

index cdf391a53ff319f4b884c13e5f31100a5342ca44..18ca350e7ed54bdb9dab10e940d4764968277045 100644 (file)
 check_PROGRAMS = genfile mksparse
 BUILT_SOURCES = preset
 
-TESTS = version.sh \
-  append.sh delete01.sh delete02.sh delete03.sh delete04.sh \
-  extrac01.sh extrac02.sh extrac03.sh extrac04.sh \
-  gzip.sh incremen.sh ignfail.sh listed01.sh \
-  longv7.sh multiv01.sh old.sh options.sh volume.sh \
-  recurse.sh \
-  star/gtarfail.sh \
-  star/gtarfail2.sh \
-  star/multi-fail.sh \
-  star/ustar-big-2g.sh \
-  star/ustar-big-8g.sh \
-  star/pax-big-10g.sh \
-  star/qucktest.sh 
+TESTS = \
+ version.sh\
+ append.sh\
+ delete01.sh\
+ delete02.sh\
+ delete03.sh\
+ delete04.sh\
+ extrac01.sh\
+ extrac02.sh\
+ extrac03.sh\
+ extrac04.sh\
+ gzip.sh\
+ incremen.sh\
+ ignfail.sh\
+ listed01.sh\
+ longv7.sh\
+ multiv01.sh\
+ multiv02.sh\
+ old.sh\
+ options.sh\
+ volume.sh\
+ recurse.sh\
+ sparse01.sh\
+ star/gtarfail.sh\
+ star/gtarfail2.sh\
+ star/multi-fail.sh\
+ star/ustar-big-2g.sh\
+ star/ustar-big-8g.sh\
+ star/pax-big-10g.sh\
+ star/qucktest.sh 
 
 genfile_SOURCES = genfile.c
 mksparse_SOURCES = mksparse.c
diff --git a/tests/multiv02.sh b/tests/multiv02.sh
new file mode 100755 (executable)
index 0000000..324b066
--- /dev/null
@@ -0,0 +1,43 @@
+#! /bin/sh
+
+# Previous versions of tar were not able to skip a member straddling
+# the multivolume archive boundary. Reported by Mads Martin Joergensen
+# <mmj@suse.de>
+
+# This file is part of GNU tar testsuite.
+# Copyright (C) 2004 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 2, 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+. ./preset
+TAR_ARCHIVE_FORMATS="gnu oldgnu"
+. $srcdir/before
+
+genfile --length 10240 > en
+genfile --length 20000 > to
+genfile --length 20000 > tre
+genfile --length 10240 > fire
+
+tar -c -f A.tar -f B.tar -f C.tar -M -L 30 en to tre fire
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en
+
+out="\
+separator
+en
+"
+
+. $srcdir/after
\ No newline at end of file
diff --git a/tests/sparse01.sh b/tests/sparse01.sh
new file mode 100755 (executable)
index 0000000..05f7cc6
--- /dev/null
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+# Check sparse file handling.
+
+# This file is part of GNU tar testsuite.
+# Copyright (C) 2004 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 2, 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+. ./preset
+TAR_ARCHIVE_FORMATS="gnu oldgnu posix"
+. $srcdir/before
+
+genfile --length 1000 > begin
+genfile --length 1000 > end
+mksparse sparsefile 512 0 ABCD 1M EFGH 2000K IJKL
+tar -c -f archive --sparse begin sparsefile end
+echo separator
+
+tar tfv archive
+
+out_regex="\
+separator
+-rw-r--r-- [^ ][^ ]*  *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] begin
+-rw-r--r-- [^ ][^ ]*  *10344448[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] sparsefile
+-rw-r--r-- [^ ][^ ]*  *1000 [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9] end
+"
+
+. $srcdir/after
This page took 0.024755 seconds and 4 git commands to generate.