[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05-fyi-modtests.patch
From: |
Akim Demaille |
Subject: |
05-fyi-modtests.patch |
Date: |
Mon, 01 Oct 2001 09:39:00 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* tests/generate.awk: Tag the tests with `documentation'.
* tests/modules.at (AT_CHECK_M4_MODTEST): New.
Use the make the existing modtest tests more uniform, and complete
the set of possibilities.
Index: tests/generate.awk
--- tests/generate.awk Sat, 29 Sep 2001 18:48:17 +0200 akim
+++ tests/generate.awk Sun, 30 Sep 2001 11:21:41 +0200 akim
@@ -140,7 +140,8 @@
printf ("## %s. ##\n", node);
printf ("## %s ##\n", banner);
printf ("\n");
- printf ("AT_SETUP([[%s]])\n\n", node);
+ printf ("AT_SETUP([[%s]])\n", node);
+ printf ("AT_KEYWORDS([[documentation]])\n\n");
}
function new_test(input, status, output, error) {
Index: tests/modules.at
--- tests/modules.at Mon, 03 Sep 2001 15:40:52 +0200 akim
+++ tests/modules.at Sun, 30 Sep 2001 13:36:28 +0200 akim
@@ -66,97 +66,57 @@
-## ----------------------------------- ##
-## --module-directory: absolute path. ##
-## ----------------------------------- ##
+## ---------------------------- ##
+## Exercising the test module. ##
+## ---------------------------- ##
+
+# AT_CHECK_M4_MODTEST(TITLE, ENV-VARS, M4-OPTIONS, [STDOUT], [STDERR])
+# --------------------------------------------------------------------
+# Skip this test if modtest is not present (we are not in the build tree).
+m4_define([AT_CHECK_M4_MODTEST],
+[AT_SETUP([$1])
+AT_KEYWORDS([module])
-AT_SETUP([--module-directory: absolute path])
+AT_CHECK([test -f $top_builddir/modules/modtest.la || exit 77])
-AT_CHECK(M4PATH=$top_srcdir [m4 -M `cd $top_builddir/modules; pwd` -m load -d
modules/modtest.m4], 0,
-[[Test module loaded.
-Test module called.
-Dumpdef: .
-]],
-[[test: <test>
+AT_DATA([input.m4],
+[[load(`modtest')
+test
+Dumpdef: dumpdef(`test').
]])
-AT_CLEANUP
-
-
-
-## -------- ##
-## modpath2 ##
-## -------- ##
-
-AT_SETUP([modpath2])
-
-AT_CHECK([M4PATH=$top_srcdir LTDL_LIBRARY_PATH=$top_builddir/modules m4 -m
load -d modules/modtest.m4], 0,
+AT_CHECK([$2 m4 -m load -d input.m4 $3], 0,
+ m4_default([$4],
[[Test module loaded.
Test module called.
Dumpdef: .
-]],
+]]),
+ m4_default([$5],
[[test: <test>
-]])
+]]))
AT_CLEANUP
+])
-## -------- ##
-## modpath3 ##
-## -------- ##
-
-AT_SETUP([modpath3])
+AT_CHECK_M4_MODTEST([--module-directory: absolute path],
+ [], [-M $top_buildpath/modules])
-AT_DATA([[in]],
-[[test
-Dumpdef: dumpdef(`test').
-]])
+AT_CHECK_M4_MODTEST([--module-directory: relative path],
+ [], [-M $top_builddir/modules])
-AT_CHECK([M4PATH=$top_srcdir m4 -m load -m modtest -M $top_builddir/modules -d
in], 0,
-[[Test module called.
-Dumpdef: .
-]],
-[[test: <test>
-]])
-
-AT_CLEANUP
+AT_CHECK_M4_MODTEST([LTDL_LIBRARY_PATH: absolute path],
+ [LTDL_LIBRARY_PATH=$top_buildpath/modules], [])
+AT_CHECK_M4_MODTEST([LTDL_LIBRARY_PATH: relative path],
+ [LTDL_LIBRARY_PATH=$top_builddir/modules], [])
+AT_CHECK_M4_MODTEST([M4MODPATH: absolute path],
+ [M4MODPATH=$top_buildpath/modules], [])
-## -------- ##
-## modpath4 ##
-## -------- ##
-
-AT_SETUP([M4MODPATH: absolute path])
-
-AT_CHECK([M4MODPATH=`cd $top_builddir/modules; pwd` M4PATH=$top_srcdir m4 -m
load -d modules/modtest.m4], 0,
-[[Test module loaded.
-Test module called.
-Dumpdef: .
-]],
-[[test: <test>
-]])
-
-AT_CLEANUP
-
-
-
-## ------- ##
-## modtest ##
-## ------- ##
-
-AT_SETUP([modtest])
-
-AT_CHECK([M4PATH=$top_srcdir m4 -M $top_builddir/modules -m load -d
modules/modtest.m4], 0,
-[[Test module loaded.
-Test module called.
-Dumpdef: .
-]],
-[[test: <test>
-]])
-
-AT_CLEANUP
+AT_CHECK_M4_MODTEST([M4MODPATH: relative path],
+ [M4MODPATH=$top_builddir/modules], [])
@@ -166,7 +126,7 @@ Dumpdef: .
AT_SETUP([shadow])
-AT_DATA([[shadow.m4]],
+AT_DATA([[input.m4]],
[[# no modules loaded yet
test
shadow
@@ -291,7 +251,7 @@ test: <test>
shadow: <shadow>
]])
-AT_CHECK_M4([-m load shadow.m4], 0,
+AT_CHECK_M4([-m load input.m4], 0,
[expout], [experr])
AT_CLEANUP
@@ -304,7 +264,7 @@ shadow: <shadow>
AT_SETUP([unload])
-AT_DATA([[in]],
+AT_DATA([[input.m4]],
[[test
__test__
load(`modtest')
@@ -350,6 +310,6 @@ Shadow::test called.
__test__
]])
-AT_CHECK_M4([-m load in], 0, expout)
+AT_CHECK_M4([-m load input.m4], 0, expout)
AT_CLEANUP
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 05-fyi-modtests.patch,
Akim Demaille <=