[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh test/tests/manpages/test-manpages ChangeLog...
From: |
Peter Maydell |
Subject: |
[Nmh-commits] nmh test/tests/manpages/test-manpages ChangeLog... |
Date: |
Fri, 26 Dec 2008 16:32:07 +0000 |
CVSROOT: /cvsroot/nmh
Module name: nmh
Changes by: Peter Maydell <pm215> 08/12/26 16:32:07
Modified files:
test/tests/manpages: test-manpages
. : ChangeLog
Added files:
test : common.sh
Log message:
test/common.sh: new file for common utility functions for the test
scripts.
Moved findprog out of manpage test script into this new file.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/test/common.sh?cvsroot=nmh&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/nmh/test/tests/manpages/test-manpages?cvsroot=nmh&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/nmh/ChangeLog?cvsroot=nmh&r1=1.300&r2=1.301
Patches:
Index: test/tests/manpages/test-manpages
===================================================================
RCS file: /cvsroot/nmh/nmh/test/tests/manpages/test-manpages,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/tests/manpages/test-manpages 3 Aug 2008 15:14:24 -0000 1.1
+++ test/tests/manpages/test-manpages 26 Dec 2008 16:32:07 -0000 1.2
@@ -6,31 +6,9 @@
#
######################################################
-# First find out whether we have a groff on the path:
+. common.sh
-# portable implementation of 'which' utility
-findprog()
-{
- FOUND=
- PROG="$1"
- IFS_SAVE="$IFS"
- IFS=:
- for D in $PATH; do
- if [ -z "$D" ]; then
- D=.
- fi
- if [ -f "$D/$PROG" ] && [ -x "$D/$PROG" ]; then
- printf '%s\n' "$D/$PROG"
- break
- fi
- done
- IFS="$IFS_SAVE"
-}
-
-if [ -z "$(findprog groff)" ]; then
- echo "Test $0 SKIP (missing groff)"
- exit 120
-fi
+require_prog groff
cd $MH_TEST_DIR/share/man
Index: ChangeLog
===================================================================
RCS file: /cvsroot/nmh/nmh/ChangeLog,v
retrieving revision 1.300
retrieving revision 1.301
diff -u -b -r1.300 -r1.301
--- ChangeLog 25 Dec 2008 23:30:33 -0000 1.300
+++ ChangeLog 26 Dec 2008 16:32:07 -0000 1.301
@@ -1,4 +1,10 @@
-2008-08-03 Peter Maydell <address@hidden>
+2008-12-26 Peter Maydell <address@hidden>
+
+ * test/common.sh: new file for common utility functions for the
+ test scripts. Moved findprog out of manpage test script into this
+ new file.
+
+2008-12-25 Peter Maydell <address@hidden>
* test/runtest: automatically run setup-test if it hasn't already
been done. Improve error handling in test script with 'set -e'.
Index: test/common.sh
===================================================================
RCS file: test/common.sh
diff -N test/common.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ test/common.sh 26 Dec 2008 16:32:07 -0000 1.1
@@ -0,0 +1,33 @@
+# Common helper routines for test shell scripts -- intended to be sourced by
them
+test_skip ()
+{
+ WHY="$1"
+ echo "$Test $0 SKIP ($WHY)"
+ exit 120
+}
+
+# portable implementation of 'which' utility
+findprog()
+{
+ FOUND=
+ PROG="$1"
+ IFS_SAVE="$IFS"
+ IFS=:
+ for D in $PATH; do
+ if [ -z "$D" ]; then
+ D=.
+ fi
+ if [ -f "$D/$PROG" ] && [ -x "$D/$PROG" ]; then
+ printf '%s\n' "$D/$PROG"
+ break
+ fi
+ done
+ IFS="$IFS_SAVE"
+}
+
+require_prog ()
+{
+ if [ -z "$(findprog $1)" ]; then
+ test_skip "missing $1"
+ fi
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] nmh test/tests/manpages/test-manpages ChangeLog...,
Peter Maydell <=