Rewritten testsuite in autotest
authorSergey Poznyakoff <gray@gnu.org.ua>
Tue, 7 Sep 2004 18:48:13 +0000 (18:48 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 7 Sep 2004 18:48:13 +0000 (18:48 +0000)
73 files changed:
tests/after [deleted file]
tests/append.at [new file with mode: 0644]
tests/append.sh [deleted file]
tests/atlocal.in [new file with mode: 0644]
tests/before [deleted file]
tests/delete01.at [new file with mode: 0644]
tests/delete01.sh [deleted file]
tests/delete02.at [new file with mode: 0644]
tests/delete02.sh [deleted file]
tests/delete03.at [new file with mode: 0644]
tests/delete03.sh [deleted file]
tests/delete04.at [new file with mode: 0644]
tests/delete04.sh [deleted file]
tests/extrac01.at [new file with mode: 0644]
tests/extrac01.sh [deleted file]
tests/extrac02.at [new file with mode: 0644]
tests/extrac02.sh [deleted file]
tests/extrac03.at [new file with mode: 0644]
tests/extrac03.sh [deleted file]
tests/extrac04.at [new file with mode: 0644]
tests/extrac04.sh [deleted file]
tests/extrac05.at [new file with mode: 0644]
tests/extrac05.sh [deleted file]
tests/gzip.at [new file with mode: 0644]
tests/gzip.sh [deleted file]
tests/ignfail.at [new file with mode: 0644]
tests/ignfail.sh [deleted file]
tests/incremen.sh [deleted file]
tests/incremental.at [new file with mode: 0644]
tests/link01.at [new file with mode: 0644]
tests/link01.sh [deleted file]
tests/listed01.at [new file with mode: 0644]
tests/listed01.sh [deleted file]
tests/listed02.at [new file with mode: 0644]
tests/listed02.sh [deleted file]
tests/longv7.at [new file with mode: 0644]
tests/longv7.sh [deleted file]
tests/multiv01.at [new file with mode: 0644]
tests/multiv01.sh [deleted file]
tests/multiv02.at [new file with mode: 0644]
tests/multiv02.sh [deleted file]
tests/multiv03.at [new file with mode: 0644]
tests/multiv03.sh [deleted file]
tests/old.at [new file with mode: 0644]
tests/old.sh [deleted file]
tests/options.at [new file with mode: 0644]
tests/options.sh [deleted file]
tests/preset.in [deleted file]
tests/recurse.at [new file with mode: 0644]
tests/recurse.sh [deleted file]
tests/same-order01.at [new file with mode: 0644]
tests/same-order01.sh [deleted file]
tests/same-order02.at [new file with mode: 0644]
tests/same-order02.sh [deleted file]
tests/sparse01.at [new file with mode: 0644]
tests/sparse01.sh [deleted file]
tests/star/gtarfail.at [new file with mode: 0644]
tests/star/gtarfail.sh [deleted file]
tests/star/gtarfail2.at [new file with mode: 0644]
tests/star/gtarfail2.sh [deleted file]
tests/star/multi-fail.at [new file with mode: 0644]
tests/star/multi-fail.sh [deleted file]
tests/star/pax-big-10g.at [new file with mode: 0644]
tests/star/pax-big-10g.sh [deleted file]
tests/star/ustar-big-2g.at [new file with mode: 0644]
tests/star/ustar-big-2g.sh [deleted file]
tests/star/ustar-big-8g.at [new file with mode: 0644]
tests/star/ustar-big-8g.sh [deleted file]
tests/testsuite.at [new file with mode: 0644]
tests/version.at [new file with mode: 0644]
tests/version.sh [deleted file]
tests/volume.at [new file with mode: 0644]
tests/volume.sh [deleted file]

diff --git a/tests/after b/tests/after
deleted file mode 100755 (executable)
index 7de077f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /bin/sh
-
-# Do common operations after a particular test.
-
-# 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.
-
-cd ..
-exec 1> /dev/null
-exec 2> /dev/null
-
-compare() {
-    eval tempfile=tmp-$$/std${1}
-    eval echo \""\${$1}"\" | sed '$d' > ${tempfile}0
-    
-    sedscript=tmp-$$/${1}.sed
-    if eval test \".\${${1}_ignore}\" = .; then
-       :
-    else
-       eval echo \"\${${1}_ignore}\" | sed 's,^.*$,/&/d,;' > $sedscript
-       sed -f $sedscript ${tempfile} > ${tempfile}.1
-       mv ${tempfile}.1 ${tempfile}
-    fi
-    
-    if eval test -z \"\${${1}_regex}\" ; then
-       cmp -s ${tempfile}0 ${tempfile} || exit 1
-    else
-       awk '{print NR " " $0}' ${tempfile}0 > ${tempfile}.1
-       awk '{print NR " " $0}' ${tempfile} | join ${tempfile}.1 - |
-       while read NUM RE LINE
-       do
-         echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
-       done 
-    fi
-}
-
-compare out
-compare err
-
-rm -rf tmp-$$
diff --git a/tests/append.at b/tests/append.at
new file mode 100644 (file)
index 0000000..5bbc1ad
--- /dev/null
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([append])
+AT_KEYWORDS([append])
+
+AT_TAR_CHECK([touch file1
+          touch file2
+          tar cf archive file1
+          tar rf archive file2
+          tar tf archive],
+          [0],
+[file1
+file2
+])
+
+AT_CLEANUP
diff --git a/tests/append.sh b/tests/append.sh
deleted file mode 100755 (executable)
index d3adcca..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Problem: Append was just not working.
-
-. ./preset
-. $srcdir/before
-
-set -e
-touch file1
-touch file2
-tar cf archive file1
-tar rf archive file2
-tar tf archive
-
-out="\
-file1
-file2
-"
-
-. $srcdir/after
diff --git a/tests/atlocal.in b/tests/atlocal.in
new file mode 100644 (file)
index 0000000..8fd5655
--- /dev/null
@@ -0,0 +1,6 @@
+# @configure_input@                                     -*- shell-script -*-
+# Configurable variable values for tar test suite.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+PATH=@abs_builddir@:@abs_top_builddir@/src:$top_srcdir:$srcdir:$PATH
+
diff --git a/tests/before b/tests/before
deleted file mode 100755 (executable)
index 04cbfdd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-
-# Do common operations before a particular test.
-
-# 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.
-
-case $# in
-    0)   TAR_ARCHIVE_FORMATS="${TAR_ARCHIVE_FORMATS:-v7 oldgnu ustar posix gnu}"
-         for format in $TAR_ARCHIVE_FORMATS
-         do
-            $0 $format
-            R=$?
-            test $R -eq 0 || exit $R
-        done
-        exit 0;;
-    1)   if test "x$1" = xauto; then
-            TAR_OPTIONS=
-        else    
-            TAR_OPTIONS="--format=$1"
-        fi;;   
-    *)   echo "Too many arguments" >&2 
-         exit 2;;
-esac    
-
-mkdir tmp-$$
-cd tmp-$$
-
-out=
-err=
-
-export TAR_OPTIONS
-#echo "$0 $1"
-echo "$0 $1" > checking
-exec 1> stdout
-exec 2> stderr
-
-           
diff --git a/tests/delete01.at b/tests/delete01.at
new file mode 100644 (file)
index 0000000..81f6a77
--- /dev/null
@@ -0,0 +1,36 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Deleting a member after a big one was destroying the archive.
+
+AT_SETUP([deleting a member after a big one])
+AT_KEYWORDS([delete01])
+
+AT_TAR_CHECK([
+genfile -l 50000 > file1
+genfile -l 1024 > file2
+tar cf archive file1 file2
+tar f archive --delete file2
+tar tf archive],
+[0],
+[file1
+])
+
+AT_CLEANUP
diff --git a/tests/delete01.sh b/tests/delete01.sh
deleted file mode 100755 (executable)
index e620d90..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Deleting a member after a big one was destroying the archive.
-
-. ./preset
-. $srcdir/before
-
-set -e
-genfile -l 50000 > file1
-genfile -l 1024 > file2
-tar cf archive file1 file2
-tar f archive --delete file2
-tar tf archive
-
-out="\
-file1
-"
-
-. $srcdir/after
diff --git a/tests/delete02.at b/tests/delete02.at
new file mode 100644 (file)
index 0000000..a459e6b
--- /dev/null
@@ -0,0 +1,44 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Deleting a member with the archive from stdin was not working correctly.
+
+AT_SETUP([deleting a member from stdin archive])
+AT_KEYWORDS([delete02])
+
+AT_TAR_CHECK([
+genfile -l 3073 -p zeros > 1
+cp 1 2
+cp 2 3
+tar cf archive 1 2 3
+tar tf archive
+cat archive | tar f - --delete 2 > archive2
+echo separator
+tar tf archive2],
+[0],
+[1
+2
+3
+separator
+1
+3
+])
+
+AT_CLEANUP
diff --git a/tests/delete02.sh b/tests/delete02.sh
deleted file mode 100755 (executable)
index 2a1df38..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Deleting a member with the archive from stdin was not working correctly.
-
-. ./preset
-. $srcdir/before
-
-set -e
-genfile -l 3073 -p zeros > 1
-cp 1 2
-cp 2 3
-tar cf archive 1 2 3
-tar tf archive
-cat archive | tar f - --delete 2 > archive2
-echo -----
-tar tf archive2
-
-out="\
-1
-2
-3
------
-1
-3
-"
-
-. $srcdir/after
diff --git a/tests/delete03.at b/tests/delete03.at
new file mode 100644 (file)
index 0000000..d4b9484
--- /dev/null
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([deleting members with long names])
+AT_KEYWORDS([delete03])
+
+m4_define([PREFIX],[This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX])
+
+AT_TAR_CHECK([
+
+prefix=PREFIX
+rm -f $prefix*
+for i in 1 2 3 4 5 6 7 8 9
+do touch $prefix$i
+done
+tar -cf archive ./$prefix* &&
+ tar --delete -f archive ./${prefix}5 && 
+ tar -tf archive 
+],
+[0],
+[./PREFIX[]1
+./PREFIX[]2
+./PREFIX[]3
+./PREFIX[]4
+./PREFIX[]6
+./PREFIX[]7
+./PREFIX[]8
+./PREFIX[]9
+],[],[],[],[gnu, oldgnu, posix])
+
+AT_CLEANUP
diff --git a/tests/delete03.sh b/tests/delete03.sh
deleted file mode 100755 (executable)
index cf988e6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2001 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 
-
-set -e
-prefix=This_is_a_very_long_file_name_prefix_that_is_designed_to_cause_problems_with_file_names_that_run_into_a_limit_of_the_posix_tar_formatXX
-rm -f $prefix*
-for i in 1 2 3 4 5 6 7 8 9
-do touch $prefix$i
-done
-tar -cf archive ./$prefix*
-tar --delete -f archive ./${prefix}5
-tar -tf archive
-
-out="\
-./${prefix}1
-./${prefix}2
-./${prefix}3
-./${prefix}4
-./${prefix}6
-./${prefix}7
-./${prefix}8
-./${prefix}9
-"
-
-. $srcdir/after
diff --git a/tests/delete04.at b/tests/delete04.at
new file mode 100644 (file)
index 0000000..33c6a64
--- /dev/null
@@ -0,0 +1,53 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Deleting a large last member was destroying earlier members.
+
+AT_SETUP([deleting a large last member])
+AT_KEYWORDS([delete04])
+
+AT_TAR_CHECK([
+genfile -l      3 >file1
+genfile -l      5 >file2
+genfile -l      3 >file3
+genfile -l      6 >file4
+genfile -l     24 >file5
+genfile -l     13 >file6
+genfile -l   1385 >file7
+genfile -l     30 >file8
+genfile -l     10 >file9
+genfile -l 256000 >file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+],
+[0],
+[file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+])
+
+AT_CLEANUP
diff --git a/tests/delete04.sh b/tests/delete04.sh
deleted file mode 100755 (executable)
index 47090a6..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Deleting a large last member was destroying earlier members.
-
-. ./preset
-. $srcdir/before
-
-set -e
-genfile -l      3 >file1
-genfile -l      5 >file2
-genfile -l      3 >file3
-genfile -l      6 >file4
-genfile -l     24 >file5
-genfile -l     13 >file6
-genfile -l   1385 >file7
-genfile -l     30 >file8
-genfile -l     10 >file9
-genfile -l 256000 >file10
-tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
-tar f archive --delete file10
-tar tf archive
-
-out="\
-file1
-file2
-file3
-file4
-file5
-file6
-file7
-file8
-file9
-"
-
-. $srcdir/after
diff --git a/tests/extrac01.at b/tests/extrac01.at
new file mode 100644 (file)
index 0000000..188fdfe
--- /dev/null
@@ -0,0 +1,33 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# There was a diagnostic when directory already exists.
+
+AT_SETUP([extract01])
+AT_KEYWORDS([extract01])
+
+AT_TAR_CHECK([
+mkdir directory
+touch directory/file
+tar cf archive directory || exit 1
+tar xf archive || exit 1
+])
+
+AT_CLEANUP
diff --git a/tests/extrac01.sh b/tests/extrac01.sh
deleted file mode 100755 (executable)
index f16e922..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-# 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.
-
-# There was a diagnostic when directory already exists.
-
-. ./preset
-. $srcdir/before
-
-set -e
-mkdir directory
-touch directory/file
-tar cf archive directory || exit 1
-tar xf archive || exit 1
-
-. $srcdir/after
diff --git a/tests/extrac02.at b/tests/extrac02.at
new file mode 100644 (file)
index 0000000..41b086e
--- /dev/null
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Could not extract symlinks over an existing file.
+
+AT_SETUP([extracting symlings over an existing file])
+AT_KEYWORDS([extract02])
+
+# FIXME: Skip if symlinks are not supported on the system
+
+AT_TAR_CHECK([
+touch file
+ln -s file link 2> /dev/null || ln file link
+tar cf archive link
+rm link
+touch link
+tar xf archive
+])
+
+AT_CLEANUP
diff --git a/tests/extrac02.sh b/tests/extrac02.sh
deleted file mode 100755 (executable)
index 083abea..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Could not extract symlinks over an existing file.
-
-. ./preset
-. $srcdir/before
-
-set -e
-touch file
-ln -s file link 2> /dev/null || ln file link
-tar cf archive link
-rm link
-touch link
-tar xf archive
-
-. $srcdir/after
diff --git a/tests/extrac03.at b/tests/extrac03.at
new file mode 100644 (file)
index 0000000..12e6424
--- /dev/null
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Paths going up and down were inducing extraction loops.
+
+AT_SETUP([extraction loops])
+AT_KEYWORDS([extract03])
+
+AT_TAR_CHECK([
+mkdir directory
+tar -cPvf archive directory/../directory
+echo separator
+tar -xPvf archive],
+[0],
+[directory/../directory/
+separator
+directory/../directory/
+])
+
+AT_CLEANUP
diff --git a/tests/extrac03.sh b/tests/extrac03.sh
deleted file mode 100755 (executable)
index 94ae69e..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Paths going up and down were inducing extraction loops.
-
-. ./preset
-. $srcdir/before
-
-set -e
-mkdir directory
-tar -cPvf archive directory/../directory
-echo -----
-tar -xPvf archive
-
-out="\
-directory/../directory/
------
-directory/../directory/
-"
-
-. $srcdir/after
diff --git a/tests/extrac04.at b/tests/extrac04.at
new file mode 100644 (file)
index 0000000..4aebf4b
--- /dev/null
@@ -0,0 +1,46 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Check for fnmatch problems in glibc 2.1.95.
+
+AT_SETUP([extract + fnmatch])
+AT_KEYWORDS([extract04])
+
+AT_TAR_CHECK([
+touch file1
+mkdir directory
+mkdir directory/subdirectory
+touch directory/file1
+touch directory/file2
+touch directory/subdirectory/file1
+touch directory/subdirectory/file2
+tar -cf archive ./file1 directory
+tar -tf archive \
+  --exclude='./*1' \
+  --exclude='d*/*1' \
+  --exclude='d*/s*/*2' | sort
+],
+[0],
+[directory/
+directory/file2
+directory/subdirectory/
+])
+
+AT_CLEANUP
diff --git a/tests/extrac04.sh b/tests/extrac04.sh
deleted file mode 100755 (executable)
index 4b588b3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Check for fnmatch problems in glibc 2.1.95.
-
-. ./preset
-. $srcdir/before
-
-set -e
-touch file1
-mkdir directory
-mkdir directory/subdirectory
-touch directory/file1
-touch directory/file2
-touch directory/subdirectory/file1
-touch directory/subdirectory/file2
-tar -cf archive ./file1 directory
-tar -tf archive \
-  --exclude='./*1' \
-  --exclude='d*/*1' \
-  --exclude='d*/s*/*2' | sort
-
-out="\
-directory/
-directory/file2
-directory/subdirectory/
-"
-
-. $srcdir/after
diff --git a/tests/extrac05.at b/tests/extrac05.at
new file mode 100644 (file)
index 0000000..da66266
--- /dev/null
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Problem: when extracting selected members from a PAX archive,
+# tar 1.14 incorrectly deemed all members to be sparse and
+# therefore was not able to properly skip them.
+#
+# Reported by: Luca Fibbi <fibbi@lamma.rete.toscana.it>
+#
+# References: <3.0.6.32.20040809113727.00a30e50@localhost>
+# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00008.html
+
+AT_SETUP([extracting selected members from pax])
+AT_KEYWORDS([extract05])
+
+AT_DATA([list], 
+[jeden
+cztery
+])
+
+AT_TAR_CHECK([
+genfile --length 118 > jeden
+genfile --length 223 > dwa
+genfile --length 517 > trzy
+genfile --sparse --file sparsefile 0 ABCD 1M EFGH 2000K IJKL
+genfile --length 110 > cztery
+
+tar cf archive jeden dwa trzy cztery || exit 1
+
+mkdir dir
+cd dir
+
+tar xvfT ../archive ../../list || exit 1
+
+cd ..
+],
+[0],
+[jeden
+cztery
+],
+[],[],[],
+[posix])
+
+AT_CLEANUP
diff --git a/tests/extrac05.sh b/tests/extrac05.sh
deleted file mode 100755 (executable)
index 26784cf..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Problem: when extracting selected members from a PAX archive,
-# tar 1.14 incorrectly deemed all members to be sparse and
-# therefore was not able to properly skip them.
-#
-# Reported by: Luca Fibbi <fibbi@lamma.rete.toscana.it>
-#
-# References: <3.0.6.32.20040809113727.00a30e50@localhost>
-# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00008.html
-
-. ./preset
-TAR_ARCHIVE_FORMATS="posix"
-. $srcdir/before
-
-genfile --length 118 > jeden
-genfile --length 223 > dwa
-genfile --length 517 > trzy
-mksparse sparsefile 512 0 ABCD 1M EFGH 2000K IJKL
-genfile --length 110 > cztery
-
-tar cf archive jeden dwa trzy cztery
-
-cat > list <<EOF
-jeden
-cztery
-EOF
-
-mkdir dir
-cd dir
-
-tar xvfT ../archive ../list
-
-cd ..
-
-out="\
-jeden
-cztery
-"
-
-. $srcdir/after
-
diff --git a/tests/gzip.at b/tests/gzip.at
new file mode 100644 (file)
index 0000000..5da017c
--- /dev/null
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# tar should detect that its gzip child failed.
+
+AT_SETUP([gzip])
+AT_KEYWORDS([gzip])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+tar xfvz /dev/null
+test $? = 2 || exit 1
+],
+[0],
+[],
+[
+gzip: stdin: unexpected end of file
+tar: Child returned status 1
+tar: Error exit delayed from previous errors
+],
+[],[])
+
+AT_CLEANUP
\ No newline at end of file
diff --git a/tests/gzip.sh b/tests/gzip.sh
deleted file mode 100755 (executable)
index 06ee173..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# 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.
-
-# tar should detect that its gzip child failed.
-
-. ./preset
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar xfvz /dev/null
-test $? = 2 || exit 1
-
-err="\
-
-gzip: stdin: unexpected end of file
-tar: Child returned status 1
-tar: Error exit delayed from previous errors
-"
-
-. $srcdir/after
diff --git a/tests/ignfail.at b/tests/ignfail.at
new file mode 100644 (file)
index 0000000..bab88f3
--- /dev/null
@@ -0,0 +1,79 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Unreadable directories yielded error despite --ignore-failed-read.
+
+AT_SETUP([ignfail])
+AT_KEYWORDS([ignfail])
+
+AT_TAR_CHECK([
+if test -w / ; then
+       # The test is meaningless for super-user.
+       AT_SKIP_TEST
+else
+       touch file
+       mkdir directory
+       touch directory/file
+
+       echo 1>&2 -----
+       chmod 000 file
+       tar cf archive file
+       status=$?
+       chmod 600 file
+       test $status = 2 || exit 1
+
+       echo 1>&2 -----
+       chmod 000 file
+       tar cf archive --ignore-failed-read file || exit 1
+       status=$?
+       chmod 600 file
+       test $status = 0 || exit 1
+
+       echo 1>&2 -----
+       chmod 000 directory
+       tar cf archive directory
+       status=$?
+       chmod 700 directory
+       test $status = 2 || exit 1
+
+       echo 1>&2 -----
+       chmod 000 directory
+       tar cf archive --ignore-failed-read directory || exit 1
+       status=$?
+       chmod 700 directory
+       test $status = 0
+fi
+],
+[0],
+[],
+[
+-----
+tar: file: Cannot open: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: file: Warning: Cannot open: Permission denied
+-----
+tar: directory: Cannot savedir: Permission denied
+tar: Error exit delayed from previous errors
+-----
+tar: directory: Warning: Cannot savedir: Permission denied
+])
+
+AT_CLEANUP
diff --git a/tests/ignfail.sh b/tests/ignfail.sh
deleted file mode 100755 (executable)
index ec0fb10..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Unreadable directories yielded error despite --ignore-failed-read.
-
-. ./preset
-. $srcdir/before
-
-> check-uid
-set - x`ls -l check-uid`
-uid_name="$3"
-set - x`ls -ln check-uid`
-uid_number="$3"
-if test "$uid_name" = root || test "$uid_number" = 0; then
-
-  # The test is meaningless for super-user.
-  rm check-uid
-
-else
-
-   touch file
-   mkdir directory
-   touch directory/file
-
-   echo 1>&2 -----
-   chmod 000 file
-   tar cf archive file
-   status=$?
-   chmod 600 file
-   test $status = 2 || exit 1
-
-   echo 1>&2 -----
-   chmod 000 file
-   tar cf archive --ignore-failed-read file || exit 1
-   status=$?
-   chmod 600 file
-   test $status = 0 || exit 1
-
-   echo 1>&2 -----
-   chmod 000 directory
-   tar cf archive directory
-   status=$?
-   chmod 700 directory
-   test $status = 2 || exit 1
-
-   echo 1>&2 -----
-   chmod 000 directory
-   tar cf archive --ignore-failed-read directory || exit 1
-   status=$?
-   chmod 700 directory
-   test $status = 0 || exit 1
-
-   err="\
------
-tar: file: Cannot open: Permission denied
-tar: Error exit delayed from previous errors
------
-tar: file: Warning: Cannot open: Permission denied
------
-tar: directory: Cannot savedir: Permission denied
-tar: Error exit delayed from previous errors
------
-tar: directory: Warning: Cannot savedir: Permission denied
-"
-
-fi
-
-. $srcdir/after
diff --git a/tests/incremen.sh b/tests/incremen.sh
deleted file mode 100755 (executable)
index efb0edb..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-# 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.
-
-# A directory older than the listed entry was skipped completely.
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu"
-. $srcdir/before
-
-set -e
-mkdir structure
-echo x >structure/file
-
-# On Nextstep (and perhaps other 4.3BSD systems),
-# a newly created file's ctime isn't updated
-# until the next sync or stat operation on the file.
-ls -l structure/file >/dev/null
-
-# If the time of an initial backup and the creation time of a file contained
-# in that backup are the same, the file will be backed up again when an
-# incremental backup is done, because the incremental backup backs up
-# files created `on or after' the initial backup time.  Without the sleep
-# command, behaviour of tar becomes variable, depending whether the system
-# clock ticked over to the next second between creating the file and
-# backing it up.
-sleep 1
-
-tar cf archive --listed=list structure
-tar cfv archive --listed=list structure
-echo -----
-sleep 1
-echo y >structure/file
-tar cfv archive --listed=list structure
-
-out="\
-structure/
------
-structure/
-structure/file
-"
-
-. $srcdir/after
diff --git a/tests/incremental.at b/tests/incremental.at
new file mode 100644 (file)
index 0000000..5f57f3a
--- /dev/null
@@ -0,0 +1,60 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# A directory older than the listed entry was skipped completely.
+
+AT_SETUP([incremental])
+AT_KEYWORDS([incremental])
+
+AT_TAR_CHECK([
+mkdir structure
+echo x >structure/file
+
+# On Nextstep (and perhaps other 4.3BSD systems),
+# a newly created file's ctime isn't updated
+# until the next sync or stat operation on the file.
+ls -l structure/file >/dev/null
+
+# If the time of an initial backup and the creation time of a file contained
+# in that backup are the same, the file will be backed up again when an
+# incremental backup is done, because the incremental backup backs up
+# files created `on or after' the initial backup time.  Without the sleep
+# command, behaviour of tar becomes variable, depending whether the system
+# clock ticked over to the next second between creating the file and
+# backing it up.
+sleep 1
+
+tar cf archive --listed=list structure
+tar cfv archive --listed=list structure
+echo separator
+sleep 1
+echo y >structure/file
+tar cfv archive --listed=list structure
+],
+[0],
+[
+structure/
+separator
+structure/
+structure/file
+],
+[],[],[],[gnu,oldgnu])
+
+AT_CLEANUP
diff --git a/tests/link01.at b/tests/link01.at
new file mode 100644 (file)
index 0000000..b87d604
--- /dev/null
@@ -0,0 +1,55 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Problem: If a member with link count > 2 was stored in the archive twice,
+# previous versions of tar were not able to extract it, since they
+# were trying to link the file to itself, which always failed and
+# lead to removing the already extracted copy. This script tests
+# the workaround by Paul Eggert that leaves the extracted copy
+# untouched.
+#
+# Reported by: Toby Peterson <toby@apple.com>
+#
+# References: <2330D503-D20A-11D8-A0CF-00039391EECE@apple.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-07/msg00009.html
+
+AT_SETUP([link count gt 2])
+AT_KEYWORDS([link01])
+
+AT_TAR_CHECK([
+mkdir directory
+mkdir directory/test1
+mkdir directory/test2
+
+echo TEST > directory/test1/test.txt
+ln directory/test1/test.txt directory/test2/test.txt
+
+tar cf archive directory/test1/test.txt directory/test1/test.txt
+
+rm -r directory
+tar xf archive
+
+ls directory/test1
+],
+[0],
+[test.txt
+])
+
+AT_CLEANUP
diff --git a/tests/link01.sh b/tests/link01.sh
deleted file mode 100755 (executable)
index f88d4dd..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Problem: If a member with link count > 2 was stored in the archive twice,
-# previous versions of tar were not able to extract it, since they
-# were trying to link the file to itself, which always failed and
-# lead to removing the already extracted copy. This script tests
-# the workaround by Paul Eggert that leaves the extracted copy
-# untouched.
-#
-# Reported by: Toby Peterson <toby@apple.com>
-#
-# References: <2330D503-D20A-11D8-A0CF-00039391EECE@apple.com>
-# http://lists.gnu.org/archive/html/bug-tar/2004-07/msg00009.html
-
-. ./preset
-. $srcdir/before
-
-mkdir directory
-mkdir directory/test1
-mkdir directory/test2
-
-echo TEST > directory/test1/test.txt
-ln directory/test1/test.txt directory/test2/test.txt
-
-tar cf archive directory/test1/test.txt directory/test1/test.txt
-
-rm -r directory
-tar xf archive
-
-ls directory/test1
-
-out="test.txt
-"
-
-. $srcdir/after
-
-# End of link01.sh
diff --git a/tests/listed01.at b/tests/listed01.at
new file mode 100644 (file)
index 0000000..3f430e3
--- /dev/null
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Check if listed-incremental backups work for individual files.
+# Script proposed by Andreas Schuldei <andreas@schuldei.org>
+# References: <20040215014223.GA9699@lukas.schuldei.com>
+# http://lists.gnu.org/archive/html/bug-tar/2004-02/msg00011.html
+
+AT_SETUP([--listed for individual files])
+AT_KEYWORDS([listed01])
+
+AT_TAR_CHECK([
+mkdir directory
+genfile --length 10240 --pattern zeros > directory/file1
+# Let the things settle
+sleep 1
+
+tar --create \
+    --file=archive.1 \
+    --listed-incremental=listing \
+    directory/file*
+
+tar tf archive.1 || exit 1
+
+genfile --length 10240 --pattern zeros > directory/file2
+
+echo "separator"
+
+tar --create \
+    --file=archive.2 \
+    --listed-incremental=listing \
+    directory/file* || exit 1
+
+tar tf archive.2 || exit 1
+],
+[0],
+[directory/file1
+separator
+directory/file2
+],
+[],[],[],[gnu, oldgnu])
+
+AT_CLEANUP
+
diff --git a/tests/listed01.sh b/tests/listed01.sh
deleted file mode 100755 (executable)
index 9929cf5..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Check if listed-incremental backups work for individual files.
-# Script proposed by Andreas Schuldei <andreas@schuldei.org>
-# References: <20040215014223.GA9699@lukas.schuldei.com>
-# http://lists.gnu.org/archive/html/bug-tar/2004-02/msg00011.html
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu" 
-. $srcdir/before
-
-mkdir directory
-genfile --length 10240 --pattern zeros > directory/file1
-# Let the things settle
-sleep 1
-
-tar --create \
-    --file=archive.1 \
-    --listed-incremental=listing \
-    directory/file*
-
-tar tf archive.1
-
-genfile --length 10240 --pattern zeros > directory/file2
-
-echo "separator"
-
-tar --create \
-    --file=archive.2 \
-    --listed-incremental=listing \
-    directory/file*
-
-tar tf archive.2
-
-out="\
-directory/file1
-separator
-directory/file2
-"
-
-. $srcdir/after
diff --git a/tests/listed02.at b/tests/listed02.at
new file mode 100644 (file)
index 0000000..78730dd
--- /dev/null
@@ -0,0 +1,150 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Check if listed-incremental backups work for files moved from one directory
+# to another. 
+# Based on a script by Martin Simmons <ZYHYLCRMZPRP@spammotel.com>
+# References: 
+#  <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com>
+#  http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html
+
+AT_SETUP([working --listed])
+AT_KEYWORDS([listed02])
+
+AT_TAR_CHECK([
+mkdir directory
+
+echo Create directories
+mkdir tart
+sleep 1
+mkdir tart/c0
+sleep 1
+mkdir tart/c1
+sleep 1
+
+for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
+do
+  echo File $file > $file
+  sleep 1
+done
+
+sleep 1
+echo Creating main archive
+tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart || exit 1
+
+sleep 1
+echo Modifying filesystem
+rm tart/a1
+mv tart/b1 tart/b2
+mv tart/c1 tart/c2
+touch tart/c2/ca3
+
+echo Directory contents
+find tart|sort
+
+sleep 1
+echo Creating incremental archive
+cp -p tart.incr1 tart.incr2
+tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart || exit 1 
+
+sleep 1
+
+rm -rf tart/*
+echo Extracting main archive
+tar -x -v --listed-incremental=tart.incr1 -f archive.1 || exit 1
+echo Extracting incremental archive
+# This command should produce three messages about deletion
+# of the existing files, that may appear in any order. Piping
+# to sort makes sure we don't depend on any particular ordering.
+tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort 
+
+echo Final files:
+find tart|sort
+],
+[0],
+[Create directories
+Creating main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Modifying filesystem
+Directory contents
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+Creating incremental archive
+tart/
+tart/c0/
+tart/c2/
+tart/b2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+Extracting main archive
+tart/
+tart/c0/
+tart/c1/
+tart/a1
+tart/b1
+tart/c0/cq1
+tart/c0/cq2
+tart/c1/ca1
+tart/c1/ca2
+Extracting incremental archive
+tar: Deleting `tart/a1'
+tar: Deleting `tart/b1'
+tar: Deleting `tart/c1'
+tart/
+tart/b2
+tart/c0/
+tart/c2/
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+Final files:
+tart
+tart/b2
+tart/c0
+tart/c0/cq1
+tart/c0/cq2
+tart/c2
+tart/c2/ca1
+tart/c2/ca2
+tart/c2/ca3
+],
+[tar: tart/c0: Directory is new
+tar: tart/c1: Directory is new
+tar: tart/c2: Directory is new
+],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/listed02.sh b/tests/listed02.sh
deleted file mode 100755 (executable)
index 9345c16..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Check if listed-incremental backups work for files moved from one directory
-# to another. 
-# Based on a script by Martin Simmons <ZYHYLCRMZPRP@spammotel.com>
-# References: 
-#  <20040626230315.163AA1D148@cpc5-cmbg1-6-0-cust208.cmbg.cable.ntl.com>
-#  http://lists.gnu.org/archive/html/bug-tar/2004-06/msg00028.html
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu" 
-. $srcdir/before
-
-mkdir directory
-
-echo Create directories
-mkdir tart
-sleep 1
-mkdir tart/c0
-sleep 1
-mkdir tart/c1
-sleep 1
-
-for file in tart/a1 tart/b1 tart/c0/cq1 tart/c0/cq2 tart/c1/ca1 tart/c1/ca2
-do
-  echo File $file > $file
-  sleep 1
-done
-
-sleep 1
-echo Creating main archive
-tar -c -v --listed-incremental=tart.incr1 -f archive.1 tart
-
-sleep 1
-echo Modifying filesystem
-rm tart/a1
-mv tart/b1 tart/b2
-mv tart/c1 tart/c2
-touch tart/c2/ca3
-
-echo Directory contents
-find tart|sort
-
-sleep 1
-echo Creating incremental archive
-cp -p tart.incr1 tart.incr2
-tar -c -v --listed-incremental=tart.incr2 -f archive.2 tart
-
-sleep 1
-
-rm -rf tart/*
-echo Extracting main archive
-tar -x -v --listed-incremental=tart.incr1 -f archive.1
-echo Extracting incremental archive
-# This command should produce three messages about deletion
-# of the existing files, that may appear in any order. Piping
-# to sort makes sure we don't depend on any particular ordering.
-tar -x -v --listed-incremental=tart.incr2 -f archive.2 | sort
-
-echo Final files:
-find tart|sort
-
-err="tar: tart/c0: Directory is new
-tar: tart/c1: Directory is new
-tar: tart/c2: Directory is new
-"
-
-out="Create directories
-Creating main archive
-tart/
-tart/c0/
-tart/c1/
-tart/a1
-tart/b1
-tart/c0/cq1
-tart/c0/cq2
-tart/c1/ca1
-tart/c1/ca2
-Modifying filesystem
-Directory contents
-tart
-tart/b2
-tart/c0
-tart/c0/cq1
-tart/c0/cq2
-tart/c2
-tart/c2/ca1
-tart/c2/ca2
-tart/c2/ca3
-Creating incremental archive
-tart/
-tart/c0/
-tart/c2/
-tart/b2
-tart/c2/ca1
-tart/c2/ca2
-tart/c2/ca3
-Extracting main archive
-tart/
-tart/c0/
-tart/c1/
-tart/a1
-tart/b1
-tart/c0/cq1
-tart/c0/cq2
-tart/c1/ca1
-tart/c1/ca2
-Extracting incremental archive
-tar: Deleting \`tart/a1'
-tar: Deleting \`tart/b1'
-tar: Deleting \`tart/c1'
-tart/
-tart/b2
-tart/c0/
-tart/c2/
-tart/c2/ca1
-tart/c2/ca2
-tart/c2/ca3
-Final files:
-tart
-tart/b2
-tart/c0
-tart/c0/cq1
-tart/c0/cq2
-tart/c2
-tart/c2/ca1
-tart/c2/ca2
-tart/c2/ca3
-"
-
-. $srcdir/after
diff --git a/tests/longv7.at b/tests/longv7.at
new file mode 100644 (file)
index 0000000..af3e3c4
--- /dev/null
@@ -0,0 +1,48 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Old format (V7) archives should not accept file names longer than
+# 99 characters
+
+AT_SETUP([V7 and long names])
+AT_KEYWORDS([longv7])
+
+m4_define([DIR],[this_is_a_very_long_name_for_a_directory_which_causes_problems])
+m4_define([FILE],[this_is_a_very_long_file_name_which_raises_issues.c])
+
+AT_TAR_CHECK([
+mkdir DIR
+touch DIR/FILE
+
+tar cf archive DIR
+echo separator
+tar tf archive
+],
+[0],
+[separator
+DIR/
+],
+[tar: DIR/FILE: file name is too long (max 99); not dumped
+tar: Error exit delayed from previous errors
+],
+[],[],[v7])
+
+AT_CLEANUP
+
diff --git a/tests/longv7.sh b/tests/longv7.sh
deleted file mode 100755 (executable)
index 6f0bb68..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Old format (V7) archives should not accept file names longer than
-# 99 characters
-
-. ./preset
-TAR_ARCHIVE_FORMATS="v7" 
-. $srcdir/before
-
-DIR=this_is_a_very_long_name_for_a_directory_which_causes_problems
-FILE=this_is_a_very_long_file_name_which_raises_issues.c
-mkdir $DIR
-touch $DIR/$FILE
-
-tar cf archive $DIR
-echo separator
-tar tf archive
-
-err="\
-tar: $DIR/$FILE: file name is too long (max 99); not dumped
-tar: Error exit delayed from previous errors
-"
-
-out="\
-separator
-$DIR/
-"
-
-. $srcdir/after
-
diff --git a/tests/multiv01.at b/tests/multiv01.at
new file mode 100644 (file)
index 0000000..885a6c6
--- /dev/null
@@ -0,0 +1,59 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Test multivolume dumps from pipes.
+
+AT_SETUP([multivolume dumps from pipes])
+AT_KEYWORDS([multiv01])
+
+# Fixme: should be configurable
+#  TRUSS=truss -o /tmp/tr
+#  TRUSS=strace
+
+AT_TAR_CHECK([
+genfile --length 7168 > file1
+
+for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
+              " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
+  echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+  for count in 2 3 4 5 6 7 8 ; do
+    echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+  done
+done >file2
+
+tar -c --multi-volume --tape-length=10 \
+  --listed-incremental=t.snar \
+  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2 || exit 1
+
+mkdir extract-dir-pipe
+dd bs=4096 count=10 if=t2-pipe.tar 2>/dev/null |
+PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
+      -C extract-dir-pipe -x --multi-volume \
+      --tape-length=10 --read-full-records || exit 1
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+],
+[0],
+[],[],[],[],[gnu, oldgnu])
+
+AT_CLEANUP
+
+
diff --git a/tests/multiv01.sh b/tests/multiv01.sh
deleted file mode 100755 (executable)
index 58678e9..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Test multivolume dumps from pipes.
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu"
-. $srcdir/before
-
-# Fixme: should be configurable
-#  TRUSS=truss -o /tmp/tr
-#  TRUSS=strace
-set -e
-
-genfile --length 7168 > file1
-
-for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
-              " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
-  echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
-  for count in 2 3 4 5 6 7 8 ; do
-    echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
-  done
-done >file2
-
-tar -c --multi-volume --tape-length=10 \
-  --listed-incremental=t.snar \
-  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2
-
-mkdir extract-dir-pipe
-dd bs=4096 count=10 if=t2-pipe.tar 2>/dev/null |
-PATH=$PATH ${TRUSS} tar -f t1-pipe.tar -f - \
-      -C extract-dir-pipe -x --multi-volume \
-      --tape-length=10 --read-full-records
-
-cmp file1 extract-dir-pipe/file1
-cmp file2 extract-dir-pipe/file2
-
-out="\
-"
-
-. $srcdir/after
diff --git a/tests/multiv02.at b/tests/multiv02.at
new file mode 100644 (file)
index 0000000..446821d
--- /dev/null
@@ -0,0 +1,47 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Previous versions of tar were not able to skip a member straddling
+# the multivolume archive boundary. Reported by Mads Martin Joergensen
+# <mmj@suse.de>
+# 
+# References: <20040402144254.GC4409@suse.de> 
+# http://lists.gnu.org/archive/html/bug-tar/2004-04/msg00002.html
+
+AT_SETUP([skipping a straddling member])
+AT_KEYWORDS([multiv02])
+
+AT_TAR_CHECK([
+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 || exit 1
+echo separator
+tar -v -x -f A.tar -f B.tar -f C.tar -M en || exit 1
+],
+[0],
+[separator
+en
+],
+[],[],[],[gnu, oldgnu])
+
+AT_CLEANUP
diff --git a/tests/multiv02.sh b/tests/multiv02.sh
deleted file mode 100755 (executable)
index 2b21b45..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Previous versions of tar were not able to skip a member straddling
-# the multivolume archive boundary. Reported by Mads Martin Joergensen
-# <mmj@suse.de>
-# 
-# References: <20040402144254.GC4409@suse.de> 
-# http://lists.gnu.org/archive/html/bug-tar/2004-04/msg00002.html
-
-. ./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
diff --git a/tests/multiv03.at b/tests/multiv03.at
new file mode 100644 (file)
index 0000000..3fbb857
--- /dev/null
@@ -0,0 +1,61 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Problem: GNU multivolume archives are not able to continue on members
+# with filenames longer than 100 characters. Versions of tar <= 1.14
+# were not checking filename lengths and produced malformed multivolume
+# headers.
+# References: <20040809214854.GB32706@suse.de>
+# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
+
+AT_SETUP([MV archive & long filenames])
+AT_KEYWORDS([multiv03])
+
+AT_TAR_CHECK([
+AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
+BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
+
+cat > ../experr <<EOF
+tar: $BFILE: file name too long to be stored in a GNU multivolume header
+tar: Error is not recoverable: exiting now
+EOF
+
+cat > ../expout <<EOF
+$AFILE
+separator
+EOF
+
+genfile --length 15360 > $AFILE
+
+tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE || exit 1
+tar -tM -f arch.1 -f arch.2 || exit 1
+
+echo separator
+
+genfile --length 15360 > $BFILE
+tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE 
+],
+[2],
+[expout],
+[experr],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
+
diff --git a/tests/multiv03.sh b/tests/multiv03.sh
deleted file mode 100755 (executable)
index e8c5898..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Problem: GNU multivolume archives are not able to continue on members
-# with filenames longer than 100 characters. Versions of tar <= 1.14
-# were not checking filename lengths and produced malformed multivolume
-# headers.
-# References: <20040809214854.GB32706@suse.de>
-# http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu"
-. $srcdir/before
-
-AFILE=`awk 'BEGIN { for (i = 0; i < 100; i++) printf "a"; exit; }'`
-BFILE=`awk 'BEGIN { for (i = 0; i < 101; i++) printf "b"; exit; }'`
-genfile --length 15360 > $AFILE
-
-tar -M -L 10 -c -f arch.1 -f arch.2 $AFILE
-tar -tM -f arch.1 -f arch.2
-
-echo separator
-
-genfile --length 15360 > $BFILE
-tar -M -L 10 -c -f arch.1 -f arch.2 $BFILE
-
-out="\
-$AFILE
-separator
-"
-
-err="\
-tar: $BFILE: file name too long to be stored in a GNU multivolume header
-tar: Error is not recoverable: exiting now
-"
-
-. $srcdir/after
diff --git a/tests/old.at b/tests/old.at
new file mode 100644 (file)
index 0000000..6785348
--- /dev/null
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# An old archive was not receiving directories.
+
+AT_SETUP([old archives])
+AT_KEYWORDS([old])
+
+unset TAR_OPTIONS
+AT_CHECK([
+mkdir directory
+tar cfvo archive directory || exit 1
+tar tf archive
+],
+[0],
+[directory/
+directory/
+])
+
+AT_CLEANUP
diff --git a/tests/old.sh b/tests/old.sh
deleted file mode 100755 (executable)
index 2ce64a6..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# 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.
-
-# An old archive was not receiving directories.
-
-. ./preset
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-set -e
-mkdir directory
-tar cfvo archive directory
-tar tf archive
-
-out="\
-directory/
-directory/
-"
-
-. $srcdir/after
diff --git a/tests/options.at b/tests/options.at
new file mode 100644 (file)
index 0000000..0f759c8
--- /dev/null
@@ -0,0 +1,37 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Ensure that TAR_OPTIONS works in conjunction with old-style options.
+
+unset TAR_OPTIONS
+AT_SETUP([options])
+AT_KEYWORDS([options])
+
+AT_CHECK([
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+],
+[0],
+[file1
+])
+
+AT_CLEANUP
+
diff --git a/tests/options.sh b/tests/options.sh
deleted file mode 100755 (executable)
index 20c3629..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Ensure that TAR_OPTIONS works in conjunction with old-style options.
-
-. ./preset
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-set -e
-echo > file1
-TAR_OPTIONS=--numeric-owner tar chof archive file1
-tar tf archive
-
-out="\
-file1
-"
-
-. $srcdir/after
diff --git a/tests/preset.in b/tests/preset.in
deleted file mode 100755 (executable)
index 18b5b09..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-
-# Set the testing environment.
-
-# 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.
-
-PACKAGE=@PACKAGE@
-VERSION=@VERSION@
-top_srcdir=@abs_top_srcdir@
-srcdir=@abs_srcdir@
-PATH=@abs_builddir@:@abs_top_builddir@/src:$top_srcdir:$srcdir:$PATH
-
-export LANGUAGE
-LANGUAGE=
-export LC_ALL
-LC_ALL="C"
-
-skiptest() {
-    exit 77
-}
-
-star_prereq() {
-    test -z "$STAR_TESTSCRIPTS" && skiptest
-    test -r "$STAR_TESTSCRIPTS/$1" || skiptest
-}
diff --git a/tests/recurse.at b/tests/recurse.at
new file mode 100644 (file)
index 0000000..9569f19
--- /dev/null
@@ -0,0 +1,34 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([recurse])
+AT_KEYWORDS([recurse])
+
+AT_TAR_CHECK([
+mkdir directory
+touch directory/file
+tar --create --file archive --no-recursion directory || exit 1
+tar tf archive
+],
+[0],
+[directory/
+])
+
+AT_CLEANUP
diff --git a/tests/recurse.sh b/tests/recurse.sh
deleted file mode 100755 (executable)
index 79404d6..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-# 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
-. $srcdir/before
-
-set -e
-mkdir directory
-touch directory/file
-tar --create --file archive --no-recursion directory || exit 1
-tar tf archive
-
-out="directory/
-"
-
-. $srcdir/after
diff --git a/tests/same-order01.at b/tests/same-order01.at
new file mode 100644 (file)
index 0000000..d0e4f0a
--- /dev/null
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Problem: -C dir did not work with --same-order
+# Reported by: Karl-Michael Schneider <schneide@phil.uni-passau.de>
+# References: <20040507122613.GB12457@pike.phil.uni-passau.de>
+# http://lists.gnu.org/archive/html/bug-tar/2004-05/msg00008.html
+
+AT_SETUP([same-order01])
+AT_KEYWORDS([same-order01])
+
+AT_TAR_CHECK([
+genfile -l 1024 > file1
+genfile -l 1024 > file2
+tar cf archive file1 file2
+
+mkdir directory
+tar -xf archive --same-order -C directory || exit 1
+
+ls directory
+],
+[0],
+[file1
+file2
+])
+
+AT_CLEANUP
+
diff --git a/tests/same-order01.sh b/tests/same-order01.sh
deleted file mode 100755 (executable)
index a4dbe5c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Problem: -C dir did not work with --same-order
-# Reported by: Karl-Michael Schneider <schneide@phil.uni-passau.de>
-# References: <20040507122613.GB12457@pike.phil.uni-passau.de>
-# http://lists.gnu.org/archive/html/bug-tar/2004-05/msg00008.html
-
-. ./preset
-. $srcdir/before
-
-set -e
-genfile -l 1024 > file1
-genfile -l 1024 > file2
-tar cf archive file1 file2
-
-mkdir directory
-tar -xf archive --same-order -C directory 
-
-ls directory
-
-out="\
-file1
-file2
-"
-
-. $srcdir/after
diff --git a/tests/same-order02.at b/tests/same-order02.at
new file mode 100644 (file)
index 0000000..c55554b
--- /dev/null
@@ -0,0 +1,49 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# In previous versions a single -C option did not work with --same-order
+# (see same-order01.sh). However, multiple -C options worked OK. 
+# Test if we did not break the correct behavior.
+
+AT_SETUP([same-order02])
+AT_KEYWORDS([same-order02])
+
+AT_TAR_CHECK([
+genfile -l 1024 > file1
+genfile -l 1024 > file2
+tar cf archive file1 file2
+
+mkdir en
+mkdir to
+
+HERE=`pwd`
+tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2 || exit 1
+
+ls en
+echo separator
+ls to
+],
+[0],
+[file1
+separator
+file2
+])
+
+AT_CLEANUP
diff --git a/tests/same-order02.sh b/tests/same-order02.sh
deleted file mode 100755 (executable)
index c5cac7b..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /bin/sh
-# 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.
-
-# In previous versions a single -C option did not work with --same-order
-# (see same-order01.sh). However, multiple -C options worked OK. 
-# Test if we did not break the correct behavior.
-
-. ./preset
-. $srcdir/before
-
-set -e
-genfile -l 1024 > file1
-genfile -l 1024 > file2
-tar cf archive file1 file2
-
-mkdir en
-mkdir to
-
-HERE=`pwd`
-tar -xf archive --same-order -C $HERE/en file1 -C $HERE/to file2
-
-ls en
-echo separator
-ls to
-
-out="\
-file1
-separator
-file2
-"
-
-. $srcdir/after
diff --git a/tests/sparse01.at b/tests/sparse01.at
new file mode 100644 (file)
index 0000000..03adc57
--- /dev/null
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([sparse01])
+AT_KEYWORDS([sparse01])
+
+AT_TAR_CHECK([
+genfile --length 1000 > begin
+genfile --length 1000 > end
+genfile --sparse --file sparsefile --block-size 512 0 ABCD 1M EFGH 2000K IJKL
+tar -c -f archive --sparse begin sparsefile end || exit 1
+echo separator
+
+tar tfv archive
+],
+[0],
+[stdout],
+[],[],[],[gnu, oldgnu])
+
+RE_CHECK([stdout],
+[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
+])
+
+AT_CLEANUP
+
diff --git a/tests/sparse01.sh b/tests/sparse01.sh
deleted file mode 100755 (executable)
index 15a0666..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Check sparse file handling.
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu posix"
-. $srcdir/before
-
-genfile --length 1000 > begin
-genfile --length 1000 > end
-genfile --sparse --file sparsefile --block-size 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
diff --git a/tests/star/gtarfail.at b/tests/star/gtarfail.at
new file mode 100644 (file)
index 0000000..c13d494
--- /dev/null
@@ -0,0 +1,40 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([gtarfail])
+AT_KEYWORDS([gtarfail])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gtarfail.tar])
+
+tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
+],
+[0],
+[-rw-r--r-- jes/glone       518 2001-05-25 14:41:06 vedpowered.gif
+-rw-r--r-- jes/glone      6825 1997-04-29 00:19:16 cd.gif
+-rw-r--r-- jes/glone     33354 1999-06-22 12:17:38 DSCN0049c.JPG
+-rw-r--r-- jes/glone     86159 2001-06-05 18:16:04 Window1.jpg
+-rw-r--r-- jes/glone      1310 2001-05-25 13:05:41 vipower.gif
+-rw-rw-rw- jes/glone    148753 1998-09-15 13:08:15 billyboy.jpg
+])
+
+AT_CLEANUP
diff --git a/tests/star/gtarfail.sh b/tests/star/gtarfail.sh
deleted file mode 100755 (executable)
index c32e13c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# 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
-star_prereq gtarfail.tar
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
-
-out="\
--rw-r--r-- jes/glone       518 2001-05-25 14:41:06 vedpowered.gif
--rw-r--r-- jes/glone      6825 1997-04-29 00:19:16 cd.gif
--rw-r--r-- jes/glone     33354 1999-06-22 12:17:38 DSCN0049c.JPG
--rw-r--r-- jes/glone     86159 2001-06-05 18:16:04 Window1.jpg
--rw-r--r-- jes/glone      1310 2001-05-25 13:05:41 vipower.gif
--rw-rw-rw- jes/glone    148753 1998-09-15 13:08:15 billyboy.jpg
-"
-. $srcdir/after
diff --git a/tests/star/gtarfail2.at b/tests/star/gtarfail2.at
new file mode 100644 (file)
index 0000000..a2b90f6
--- /dev/null
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([gtarfail2])
+AT_KEYWORDS([gtarfail2])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gtarfail2.tar])
+tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
+],
+[0],
+[-rwxr-xr-x jes/glone       214 2001-09-21 14:08:36 .clean
+lrwxrwxrwx jes/cats          0 1998-05-07 12:39:00 RULES -> makefiles/RULES
+drwxr-sr-x jes/glone         0 2001-12-10 00:00:58 build/
+-rw-r--r-- jes/glone    312019 2001-12-10 00:00:20 build/smake-1.2.tar.gz
+drwxr-sr-x jes/glone         0 2001-11-09 18:20:33 build/psmake/
+-rwxr-xr-x jes/glone       259 2000-01-09 16:36:34 build/psmake/MAKE
+-rwxr-xr-x jes/glone      4820 2001-02-25 22:45:53 build/psmake/MAKE.sh
+-rw-r--r-- jes/glone       647 2001-02-25 23:50:06 build/psmake/Makefile
+lrwxrwxrwx jes/glone         0 2001-08-29 10:53:53 build/psmake/archconf.c -> ../archconf.c
+lrwxrwxrwx jes/glone         0 2001-08-29 10:54:00 build/psmake/astoi.c -> ../../lib/astoi.c
+])
+
+AT_CLEANUP
+
+
diff --git a/tests/star/gtarfail2.sh b/tests/star/gtarfail2.sh
deleted file mode 100755 (executable)
index 8ae14f9..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# 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
-star_prereq gtarfail2.tar
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
-
-out="\
--rwxr-xr-x jes/glone       214 2001-09-21 14:08:36 .clean
-lrwxrwxrwx jes/cats          0 1998-05-07 12:39:00 RULES -> makefiles/RULES
-drwxr-sr-x jes/glone         0 2001-12-10 00:00:58 build/
--rw-r--r-- jes/glone    312019 2001-12-10 00:00:20 build/smake-1.2.tar.gz
-drwxr-sr-x jes/glone         0 2001-11-09 18:20:33 build/psmake/
--rwxr-xr-x jes/glone       259 2000-01-09 16:36:34 build/psmake/MAKE
--rwxr-xr-x jes/glone      4820 2001-02-25 22:45:53 build/psmake/MAKE.sh
--rw-r--r-- jes/glone       647 2001-02-25 23:50:06 build/psmake/Makefile
-lrwxrwxrwx jes/glone         0 2001-08-29 10:53:53 build/psmake/archconf.c -> ../archconf.c
-lrwxrwxrwx jes/glone         0 2001-08-29 10:54:00 build/psmake/astoi.c -> ../../lib/astoi.c
-"
-
-. $srcdir/after
diff --git a/tests/star/multi-fail.at b/tests/star/multi-fail.at
new file mode 100644 (file)
index 0000000..6db908b
--- /dev/null
@@ -0,0 +1,89 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([multi-fail])
+AT_KEYWORDS([multi-fail])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gnu-multi-fail-volume1.gtar])
+AT_STAR_PREREQ([gnu-multi-fail-volume2.gtar])
+
+tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
+               -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar
+],
+[0],
+[drwxrwsr-x joerg/bs          0 2003-10-11 14:32:43 OBJ/i386-sunos5-gcc/
+-rw-r--r-- joerg/bs          1 2003-10-11 14:32:50 OBJ/i386-sunos5-gcc/Dnull
+-rw-r--r-- joerg/bs       1743 2003-10-10 18:06:58 OBJ/i386-sunos5-gcc/star.d
+-rw-r--r-- joerg/bs       1460 2003-10-11 11:53:36 OBJ/i386-sunos5-gcc/header.d
+-rw-r--r-- joerg/bs       1540 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/cpiohdr.d
+-rw-r--r-- joerg/bs       2245 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/xheader.d
+-rw-r--r-- joerg/bs       1254 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/xattr.d
+-rw-r--r-- joerg/bs       1330 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/list.d
+-rw-r--r-- joerg/bs       1745 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/extract.d
+-rw-r--r-- joerg/bs       1518 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/create.d
+-rw-r--r-- joerg/bs       1235 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/append.d
+-rw-r--r-- joerg/bs       1368 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/diff.d
+-rw-r--r-- joerg/bs       1423 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/remove.d
+-rw-r--r-- joerg/bs       1493 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/star_unix.d
+-rw-r--r-- joerg/bs       1572 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/acl_unix.d
+-rw-r--r-- joerg/bs       1453 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/fflags.d
+-rw-r--r-- joerg/bs       2257 2003-10-11 14:32:43 OBJ/i386-sunos5-gcc/buffer.d
+-rw-r--r-- joerg/bs        969 2003-10-07 17:53:47 OBJ/i386-sunos5-gcc/dirtime.d
+-rw-r--r-- joerg/bs       1308 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/lhash.d
+-rw-r--r-- joerg/bs       1287 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/hole.d
+-rw-r--r-- joerg/bs       1105 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/longnames.d
+-rw-r--r-- joerg/bs       1230 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/names.d
+-rw-r--r-- joerg/bs       1091 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/movearch.d
+-rw-r--r-- joerg/bs        961 2003-10-07 17:53:48 OBJ/i386-sunos5-gcc/table.d
+-rw-r--r-- joerg/bs       1113 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/props.d
+-rw-r--r-- joerg/bs       2146 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/fetchdir.d
+-rw-r--r-- joerg/bs       1093 2003-10-10 18:07:01 OBJ/i386-sunos5-gcc/unicode.d
+-rw-r--r-- joerg/bs       1211 2003-10-10 18:07:01 OBJ/i386-sunos5-gcc/subst.d
+-rw-r--r-- joerg/bs       2076 2003-10-11 11:53:36 OBJ/i386-sunos5-gcc/volhdr.d
+-rw-r--r-- joerg/bs       1480 2003-10-10 18:07:01 OBJ/i386-sunos5-gcc/chdir.d
+-rw-r--r-- joerg/bs      42460 2003-10-10 18:07:02 OBJ/i386-sunos5-gcc/star.o
+-rw-r--r-- joerg/bs      22564 2003-10-11 11:53:37 OBJ/i386-sunos5-gcc/header.o
+-rw-r--r-- joerg/bs       7880 2003-10-10 18:07:04 OBJ/i386-sunos5-gcc/cpiohdr.o
+-rw-r--r-- joerg/bs      14624 2003-10-10 18:07:05 OBJ/i386-sunos5-gcc/xheader.o
+-rw-r--r-- joerg/bs        924 2003-10-10 18:07:05 OBJ/i386-sunos5-gcc/xattr.o
+-rw-r--r-- joerg/bs       6120 2003-10-10 18:07:05 OBJ/i386-sunos5-gcc/list.o
+-rw-r--r-- joerg/bs      12764 2003-10-10 18:07:06 OBJ/i386-sunos5-gcc/extract.o
+-rw-r--r-- joerg/bs      14668 2003-10-10 18:07:06 OBJ/i386-sunos5-gcc/create.o
+-rw-r--r-- joerg/bs       2576 2003-10-10 18:07:07 OBJ/i386-sunos5-gcc/append.o
+-rw-r--r-- joerg/bs       7636 2003-10-10 18:07:07 OBJ/i386-sunos5-gcc/diff.o
+-rw-r--r-- joerg/bs       3072 2003-10-10 18:07:07 OBJ/i386-sunos5-gcc/remove.o
+-rw-r--r-- joerg/bs       5612 2003-10-10 18:07:08 OBJ/i386-sunos5-gcc/star_unix.o
+-rw-r--r-- joerg/bs       6220 2003-10-10 18:07:08 OBJ/i386-sunos5-gcc/acl_unix.o
+-rw-r--r-- joerg/bs       1092 2003-10-10 18:07:08 OBJ/i386-sunos5-gcc/fflags.o
+-rw-r--r-- joerg/bs      20996 2003-10-11 14:32:44 OBJ/i386-sunos5-gcc/buffer.o
+-rw-r--r-- joerg/bs       2060 2003-10-07 17:53:57 OBJ/i386-sunos5-gcc/dirtime.o
+-rw-r--r-- joerg/bs       1664 2003-10-10 18:07:09 OBJ/i386-sunos5-gcc/lhash.o
+-rw-r--r-- joerg/bs      10564 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/hole.o
+-rw-r--r-- joerg/bs       3864 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/longnames.o
+-rw-r--r-- joerg/bs       2576 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/names.o
+-rw-r--r-- joerg/bs        952 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/movearch.o
+-rw-r--r-- joerg/bs       2756 2003-10-07 17:53:59 OBJ/i386-sunos5-gcc/table.o
+])
+
+AT_CLEANUP
+
diff --git a/tests/star/multi-fail.sh b/tests/star/multi-fail.sh
deleted file mode 100755 (executable)
index de6d73b..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /bin/sh
-# 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
-star_prereq gnu-multi-fail-volume1.gtar
-star_prereq gnu-multi-fail-volume2.gtar
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar --utc -tvM -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume1.gtar \
-               -f $STAR_TESTSCRIPTS/gnu-multi-fail-volume2.gtar
-
-out="\
-drwxrwsr-x joerg/bs          0 2003-10-11 14:32:43 OBJ/i386-sunos5-gcc/
--rw-r--r-- joerg/bs          1 2003-10-11 14:32:50 OBJ/i386-sunos5-gcc/Dnull
--rw-r--r-- joerg/bs       1743 2003-10-10 18:06:58 OBJ/i386-sunos5-gcc/star.d
--rw-r--r-- joerg/bs       1460 2003-10-11 11:53:36 OBJ/i386-sunos5-gcc/header.d
--rw-r--r-- joerg/bs       1540 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/cpiohdr.d
--rw-r--r-- joerg/bs       2245 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/xheader.d
--rw-r--r-- joerg/bs       1254 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/xattr.d
--rw-r--r-- joerg/bs       1330 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/list.d
--rw-r--r-- joerg/bs       1745 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/extract.d
--rw-r--r-- joerg/bs       1518 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/create.d
--rw-r--r-- joerg/bs       1235 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/append.d
--rw-r--r-- joerg/bs       1368 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/diff.d
--rw-r--r-- joerg/bs       1423 2003-10-10 18:06:59 OBJ/i386-sunos5-gcc/remove.d
--rw-r--r-- joerg/bs       1493 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/star_unix.d
--rw-r--r-- joerg/bs       1572 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/acl_unix.d
--rw-r--r-- joerg/bs       1453 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/fflags.d
--rw-r--r-- joerg/bs       2257 2003-10-11 14:32:43 OBJ/i386-sunos5-gcc/buffer.d
--rw-r--r-- joerg/bs        969 2003-10-07 17:53:47 OBJ/i386-sunos5-gcc/dirtime.d
--rw-r--r-- joerg/bs       1308 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/lhash.d
--rw-r--r-- joerg/bs       1287 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/hole.d
--rw-r--r-- joerg/bs       1105 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/longnames.d
--rw-r--r-- joerg/bs       1230 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/names.d
--rw-r--r-- joerg/bs       1091 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/movearch.d
--rw-r--r-- joerg/bs        961 2003-10-07 17:53:48 OBJ/i386-sunos5-gcc/table.d
--rw-r--r-- joerg/bs       1113 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/props.d
--rw-r--r-- joerg/bs       2146 2003-10-10 18:07:00 OBJ/i386-sunos5-gcc/fetchdir.d
--rw-r--r-- joerg/bs       1093 2003-10-10 18:07:01 OBJ/i386-sunos5-gcc/unicode.d
--rw-r--r-- joerg/bs       1211 2003-10-10 18:07:01 OBJ/i386-sunos5-gcc/subst.d
--rw-r--r-- joerg/bs       2076 2003-10-11 11:53:36 OBJ/i386-sunos5-gcc/volhdr.d
--rw-r--r-- joerg/bs       1480 2003-10-10 18:07:01 OBJ/i386-sunos5-gcc/chdir.d
--rw-r--r-- joerg/bs      42460 2003-10-10 18:07:02 OBJ/i386-sunos5-gcc/star.o
--rw-r--r-- joerg/bs      22564 2003-10-11 11:53:37 OBJ/i386-sunos5-gcc/header.o
--rw-r--r-- joerg/bs       7880 2003-10-10 18:07:04 OBJ/i386-sunos5-gcc/cpiohdr.o
--rw-r--r-- joerg/bs      14624 2003-10-10 18:07:05 OBJ/i386-sunos5-gcc/xheader.o
--rw-r--r-- joerg/bs        924 2003-10-10 18:07:05 OBJ/i386-sunos5-gcc/xattr.o
--rw-r--r-- joerg/bs       6120 2003-10-10 18:07:05 OBJ/i386-sunos5-gcc/list.o
--rw-r--r-- joerg/bs      12764 2003-10-10 18:07:06 OBJ/i386-sunos5-gcc/extract.o
--rw-r--r-- joerg/bs      14668 2003-10-10 18:07:06 OBJ/i386-sunos5-gcc/create.o
--rw-r--r-- joerg/bs       2576 2003-10-10 18:07:07 OBJ/i386-sunos5-gcc/append.o
--rw-r--r-- joerg/bs       7636 2003-10-10 18:07:07 OBJ/i386-sunos5-gcc/diff.o
--rw-r--r-- joerg/bs       3072 2003-10-10 18:07:07 OBJ/i386-sunos5-gcc/remove.o
--rw-r--r-- joerg/bs       5612 2003-10-10 18:07:08 OBJ/i386-sunos5-gcc/star_unix.o
--rw-r--r-- joerg/bs       6220 2003-10-10 18:07:08 OBJ/i386-sunos5-gcc/acl_unix.o
--rw-r--r-- joerg/bs       1092 2003-10-10 18:07:08 OBJ/i386-sunos5-gcc/fflags.o
--rw-r--r-- joerg/bs      20996 2003-10-11 14:32:44 OBJ/i386-sunos5-gcc/buffer.o
--rw-r--r-- joerg/bs       2060 2003-10-07 17:53:57 OBJ/i386-sunos5-gcc/dirtime.o
--rw-r--r-- joerg/bs       1664 2003-10-10 18:07:09 OBJ/i386-sunos5-gcc/lhash.o
--rw-r--r-- joerg/bs      10564 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/hole.o
--rw-r--r-- joerg/bs       3864 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/longnames.o
--rw-r--r-- joerg/bs       2576 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/names.o
--rw-r--r-- joerg/bs        952 2003-10-10 18:07:10 OBJ/i386-sunos5-gcc/movearch.o
--rw-r--r-- joerg/bs       2756 2003-10-07 17:53:59 OBJ/i386-sunos5-gcc/table.o
-"
-
diff --git a/tests/star/pax-big-10g.at b/tests/star/pax-big-10g.at
new file mode 100644 (file)
index 0000000..e92baed
--- /dev/null
@@ -0,0 +1,42 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([pax-big-10g])
+AT_KEYWORDS([pax-big-10g])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([pax-big-10g.tar.bz2])
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
+],
+[0],
+[-rw------- jes/glone 10737418240 2002-06-15 21:18:47 10g
+-rw-r--r-- jes/glone           0 2002-06-15 14:53:32 file
+],
+[stderr])
+
+RE_CHECK([stderr],[tar: Record size = .*
+])
+
+AT_CLEANUP
+
+
diff --git a/tests/star/pax-big-10g.sh b/tests/star/pax-big-10g.sh
deleted file mode 100755 (executable)
index 2c49342..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# 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
-star_prereq pax-big-10g.tar.bz2
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
-
-out="\
--rw------- jes/glone 10737418240 2002-06-15 21:18:47 10g
--rw-r--r-- jes/glone           0 2002-06-15 14:53:32 file
-"
-
-err_regex="\
-tar: Record size = .*
-"
-
-. $srcdir/after
diff --git a/tests/star/ustar-big-2g.at b/tests/star/ustar-big-2g.at
new file mode 100644 (file)
index 0000000..7dbbb3c
--- /dev/null
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([ustar-big-2g])
+AT_KEYWORDS([ustar-big-2g])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([ustar-big-2g.tar.bz2])
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
+],
+[0],
+[-rw------- jes/glone 2147483647 2002-06-15 14:53:23 big
+-rw-r--r-- jes/glone          0 2002-06-15 14:53:32 file
+],
+[stderr])
+
+RE_CHECK([stderr],[tar: Record size = .*
+])
+
+AT_CLEANUP
+
diff --git a/tests/star/ustar-big-2g.sh b/tests/star/ustar-big-2g.sh
deleted file mode 100755 (executable)
index da07d20..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# 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
-star_prereq ustar-big-2g.tar.bz2
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
-
-out="\
--rw------- jes/glone 2147483647 2002-06-15 14:53:23 big
--rw-r--r-- jes/glone          0 2002-06-15 14:53:32 file
-"
-
-err_regex="\
-tar: Record size = .*
-"
-
-. $srcdir/after
diff --git a/tests/star/ustar-big-8g.at b/tests/star/ustar-big-8g.at
new file mode 100644 (file)
index 0000000..cfbd605
--- /dev/null
@@ -0,0 +1,41 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+AT_SETUP([ustar-big-8g])
+AT_KEYWORDS([ustar-big-8g])
+
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([ustar-big-8g.tar.bz2])
+
+tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
+],
+[0],
+[-rw------- jes/glone 8589934591 2002-06-15 15:08:33 8gb-1
+-rw-r--r-- jes/glone          0 2002-06-15 14:53:32 file
+],
+[stderr])
+
+RE_CHECK([stderr],[tar: Record size = .*
+])
+
+AT_CLEANUP
+
diff --git a/tests/star/ustar-big-8g.sh b/tests/star/ustar-big-8g.sh
deleted file mode 100755 (executable)
index d7ebf49..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# 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
-star_prereq ustar-big-8g.tar.bz2
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
-
-tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
-
-out="\
--rw------- jes/glone 8589934591 2002-06-15 15:08:33 8gb-1
--rw-r--r-- jes/glone          0 2002-06-15 14:53:32 file
-"
-
-err_regex="\
-tar: Record size = .*
-"
-
-. $srcdir/after
diff --git a/tests/testsuite.at b/tests/testsuite.at
new file mode 100644 (file)
index 0000000..d90a654
--- /dev/null
@@ -0,0 +1,111 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# We need a recent Autotest.
+m4_version_prereq([2.52g])
+
+m4_define([AT_TAR_CHECK],[
+  m4_foreach([FMT],
+             [m4_if([$7],[],[v7,oldgnu,ustar,posix,gnu],[$7])],
+             [AT_CHECK([
+mkdir FMT
+(cd FMT
+TAR_OPTIONS="-H FMT"
+export TAR_OPTIONS
+rm -rf *
+$1)],$2,$3,$4,$5,$6)])
+])
+
+m4_define([RE_CHECK],[
+AT_DATA([$1.re],[$2])
+awk '{print NR " " $[]0}' $1.re > $[]$.1
+awk '{print NR " " $[]0}' $1 | join $[]$.1 - |
+while read NUM RE LINE
+do
+  echo "$LINE" | grep -- "$RE" >/dev/null || exit 1
+done
+])
+
+m4_define([AT_SKIP_TEST],[exit 77])
+
+m4_define([AT_STAR_PREREQ],[
+test -z "$STAR_TESTSCRIPTS" && AT_SKIP_TEST
+test -r "$STAR_TESTSCRIPTS/$1" || AT_SKIP_TEST
+])
+
+AT_INIT
+
+AT_TESTED([tar])
+
+m4_include([version.at])
+
+m4_include([options.at])
+
+m4_include([append.at])
+
+m4_include([delete01.at])
+m4_include([delete02.at])
+m4_include([delete03.at])
+m4_include([delete04.at])
+
+m4_include([extrac01.at])
+m4_include([extrac02.at])
+m4_include([extrac03.at])
+m4_include([extrac04.at])
+m4_include([extrac05.at])
+
+m4_include([gzip.at])
+
+m4_include([incremental.at])
+
+m4_include([ignfail.at])
+
+m4_include([link01.at])
+
+m4_include([listed01.at])
+m4_include([listed02.at])
+
+m4_include([longv7.at])
+
+m4_include([multiv01.at])
+m4_include([multiv02.at])
+m4_include([multiv03.at])
+
+m4_include([old.at])
+
+m4_include([recurse.at])
+
+m4_include([same-order01.at])
+m4_include([same-order02.at])
+
+m4_include([sparse01.at])
+
+m4_include([volume.at])
+
+m4_include([star/gtarfail.at])
+m4_include([star/gtarfail2.at])
+
+m4_include([star/multi-fail.at])
+
+m4_include([star/ustar-big-2g.at])
+m4_include([star/ustar-big-8g.at])
+
+m4_include([star/pax-big-10g.at])
+
diff --git a/tests/version.at b/tests/version.at
new file mode 100644 (file)
index 0000000..f457e59
--- /dev/null
@@ -0,0 +1,27 @@
+# Checking tar version                              -*- Autotest -*-
+# 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.
+
+AT_SETUP([tar version])
+
+AT_CHECK([tar --version],
+         [0],
+         [AT_PACKAGE_TARNAME (AT_PACKAGE_NAME) AT_PACKAGE_VERSION
+])
+
+AT_CLEANUP
+          
\ No newline at end of file
diff --git a/tests/version.sh b/tests/version.sh
deleted file mode 100755 (executable)
index f24c943..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Check if the proper version is being tested.
-
-. ./preset
-
-if test -n "`$PACKAGE --version | sed -n s/$PACKAGE.*$VERSION/OK/p`"; then
-  banner="Regression testing for GNU $PACKAGE, version $VERSION"
-  dashes=`echo $banner | sed s/./=/g`
-  echo $dashes
-  echo $banner
-  echo $dashes
-else
-  echo '=============================================================='
-  echo 'WARNING: Not using the proper version, *all* checks dubious...'
-  echo '=============================================================='
-  exit 1
-fi
diff --git a/tests/volume.at b/tests/volume.at
new file mode 100644 (file)
index 0000000..b51b4cc
--- /dev/null
@@ -0,0 +1,58 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+
+# Test suite for GNU tar.
+# 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.
+
+# Volume labels are checked on read by fnmatch.
+
+AT_SETUP([volume])
+AT_KEYWORDS([volume])
+
+AT_TAR_CHECK([
+tar -cf archive -V label -T /dev/null || exit 1
+
+tar xfV archive label || exit 1
+tar xfV archive 'la?el' || exit 1
+tar xfV archive 'l*l' || exit 1
+
+echo 1>&2 -----
+tar xfV archive lab
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive bel
+test $? = 2 || exit 1
+echo 1>&2 -----
+tar xfV archive babel
+test $? = 2
+],
+[0],
+[],
+[-----
+tar: Volume `label' does not match `lab'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume `label' does not match `bel'
+tar: Error is not recoverable: exiting now
+-----
+tar: Volume `label' does not match `babel'
+tar: Error is not recoverable: exiting now
+],
+[],[],[gnu, oldgnu])
+
+AT_CLEANUP
+
diff --git a/tests/volume.sh b/tests/volume.sh
deleted file mode 100755 (executable)
index 3b17940..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /bin/sh
-# 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.
-
-# Volume labels are checked on read by fnmatch.
-
-. ./preset
-TAR_ARCHIVE_FORMATS="gnu oldgnu"
-. $srcdir/before
-
-tar -cf archive -V label -T /dev/null || exit 1
-
-tar xfV archive label || exit 1
-tar xfV archive 'la?el' || exit 1
-tar xfV archive 'l*l' || exit 1
-
-echo 1>&2 -----
-tar xfV archive lab
-test $? = 2 || exit 1
-echo 1>&2 -----
-tar xfV archive bel
-test $? = 2 || exit 1
-echo 1>&2 -----
-tar xfV archive babel
-test $? = 2 || exit 1
-
-err="\
------
-tar: Volume \`label' does not match \`lab'
-tar: Error is not recoverable: exiting now
------
-tar: Volume \`label' does not match \`bel'
-tar: Error is not recoverable: exiting now
------
-tar: Volume \`label' does not match \`babel'
-tar: Error is not recoverable: exiting now
-"
-
-. $srcdir/after