summaryrefslogtreecommitdiff
path: root/tests/star
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-09-07 18:48:13 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-09-07 18:48:13 +0000
commit35cae74c4cae8e59c84e215c493e5a032dbe4e15 (patch)
tree5a555570b1252a1ceee64fe018318d2d164311bd /tests/star
parenta1c8c7bd478ead70508c47ec08bfb7e9faa23d87 (diff)
downloadtar-35cae74c4cae8e59c84e215c493e5a032dbe4e15.tar.gz
Rewritten testsuite in autotest
Diffstat (limited to 'tests/star')
-rw-r--r--[-rwxr-xr-x]tests/star/gtarfail.at (renamed from tests/star/gtarfail.sh)33
-rw-r--r--[-rwxr-xr-x]tests/star/gtarfail2.at (renamed from tests/star/gtarfail2.sh)33
-rw-r--r--[-rwxr-xr-x]tests/star/multi-fail.at (renamed from tests/star/multi-fail.sh)34
-rw-r--r--[-rwxr-xr-x]tests/star/pax-big-10g.at (renamed from tests/star/pax-big-10g.sh)40
-rw-r--r--[-rwxr-xr-x]tests/star/ustar-big-2g.at (renamed from tests/star/ustar-big-2g.sh)39
-rw-r--r--[-rwxr-xr-x]tests/star/ustar-big-8g.at (renamed from tests/star/ustar-big-8g.sh)39
6 files changed, 125 insertions, 93 deletions
diff --git a/tests/star/gtarfail.sh b/tests/star/gtarfail.at
index c32e13cd..c13d494f 100755..100644
--- a/tests/star/gtarfail.sh
+++ b/tests/star/gtarfail.at
@@ -1,35 +1,40 @@
-#! /bin/sh
-# This file is part of GNU tar testsuite.
+# 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.
-. ./preset
-star_prereq gtarfail.tar
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
+AT_SETUP([gtarfail])
+AT_KEYWORDS([gtarfail])
-tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail.tar
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([gtarfail.tar])
-out="\
--rw-r--r-- jes/glone 518 2001-05-25 14:41:06 vedpowered.gif
+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
-"
-. $srcdir/after
+])
+
+AT_CLEANUP
diff --git a/tests/star/gtarfail2.sh b/tests/star/gtarfail2.at
index 8ae14f93..a2b90f60 100755..100644
--- a/tests/star/gtarfail2.sh
+++ b/tests/star/gtarfail2.at
@@ -1,31 +1,34 @@
-#! /bin/sh
-# This file is part of GNU tar testsuite.
+# 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.
-. ./preset
-star_prereq gtarfail2.tar
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
+AT_SETUP([gtarfail2])
+AT_KEYWORDS([gtarfail2])
-tar --utc -tvf $STAR_TESTSCRIPTS/gtarfail2.tar
+unset TAR_OPTIONS
-out="\
--rwxr-xr-x jes/glone 214 2001-09-21 14:08:36 .clean
+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
@@ -35,6 +38,8 @@ drwxr-sr-x jes/glone 0 2001-11-09 18:20:33 build/psmake/
-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
+
-. $srcdir/after
diff --git a/tests/star/multi-fail.sh b/tests/star/multi-fail.at
index de6d73b8..6db908b6 100755..100644
--- a/tests/star/multi-fail.sh
+++ b/tests/star/multi-fail.at
@@ -1,33 +1,37 @@
-#! /bin/sh
-# This file is part of GNU tar testsuite.
+# 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.
-. ./preset
-star_prereq gnu-multi-fail-volume1.gtar
-star_prereq gnu-multi-fail-volume2.gtar
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
+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
-
-out="\
-drwxrwsr-x joerg/bs 0 2003-10-11 14:32:43 OBJ/i386-sunos5-gcc/
+],
+[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
@@ -79,5 +83,7 @@ drwxrwsr-x joerg/bs 0 2003-10-11 14:32:43 OBJ/i386-sunos5-gcc/
-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/pax-big-10g.sh b/tests/star/pax-big-10g.at
index 2c493428..e92baed0 100755..100644
--- a/tests/star/pax-big-10g.sh
+++ b/tests/star/pax-big-10g.at
@@ -1,36 +1,42 @@
-#! /bin/sh
-# This file is part of GNU tar testsuite.
+# 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.
-. ./preset
-star_prereq pax-big-10g.tar.bz2
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
+AT_SETUP([pax-big-10g])
+AT_KEYWORDS([pax-big-10g])
-tar --utc -tvjf $STAR_TESTSCRIPTS/pax-big-10g.tar.bz2
+unset TAR_OPTIONS
-out="\
--rw------- jes/glone 10737418240 2002-06-15 21:18:47 10g
+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
-err_regex="\
-tar: Record size = .*
-"
-. $srcdir/after
diff --git a/tests/star/ustar-big-2g.sh b/tests/star/ustar-big-2g.at
index da07d207..7dbbb3cd 100755..100644
--- a/tests/star/ustar-big-2g.sh
+++ b/tests/star/ustar-big-2g.at
@@ -1,36 +1,41 @@
-#! /bin/sh
-# This file is part of GNU tar testsuite.
+# 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.
-. ./preset
-star_prereq ustar-big-2g.tar.bz2
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
+AT_SETUP([ustar-big-2g])
+AT_KEYWORDS([ustar-big-2g])
-tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-2g.tar.bz2
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([ustar-big-2g.tar.bz2])
-out="\
--rw------- jes/glone 2147483647 2002-06-15 14:53:23 big
+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 = .*
+])
-err_regex="\
-tar: Record size = .*
-"
+AT_CLEANUP
-. $srcdir/after
diff --git a/tests/star/ustar-big-8g.sh b/tests/star/ustar-big-8g.at
index d7ebf494..cfbd6056 100755..100644
--- a/tests/star/ustar-big-8g.sh
+++ b/tests/star/ustar-big-8g.at
@@ -1,36 +1,41 @@
-#! /bin/sh
-# This file is part of GNU tar testsuite.
+# 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.
-. ./preset
-star_prereq ustar-big-8g.tar.bz2
-TAR_ARCHIVE_FORMATS=auto
-. $srcdir/before
+AT_SETUP([ustar-big-8g])
+AT_KEYWORDS([ustar-big-8g])
-tar --utc -tvjf $STAR_TESTSCRIPTS/ustar-big-8g.tar.bz2
+unset TAR_OPTIONS
+
+AT_CHECK([
+AT_STAR_PREREQ([ustar-big-8g.tar.bz2])
-out="\
--rw------- jes/glone 8589934591 2002-06-15 15:08:33 8gb-1
+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 = .*
+])
-err_regex="\
-tar: Record size = .*
-"
+AT_CLEANUP
-. $srcdir/after