]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/base.m4: Really added to the CVS repository.
authorAkim Demaille <akim@epita.fr>
Wed, 9 Feb 2000 08:36:01 +0000 (08:36 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 9 Feb 2000 08:36:01 +0000 (08:36 +0000)
* tests/tools.m4: Likewise.

ChangeLog
tests/base.m4 [new file with mode: 0644]
tests/tools.m4 [new file with mode: 0644]

index 068c42fdf83434173ed4160d04c5cd2bbaadafea..d32a9313ed3f0dafdd674eb08fc7d212d651b3b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-02-09  Akim Demaille  <akim@epita.fr>
+
+       * tests/base.m4: Really added to the CVS repository.
+       * tests/tools.m4: Likewise.
+
 2000-02-09  Akim Demaille  <akim@epita.fr>
 
        * tests/base.m4: s/m4 -I ../m4 -I $at_top_srcdir/.
diff --git a/tests/base.m4 b/tests/base.m4
new file mode 100644 (file)
index 0000000..c4a6811
--- /dev/null
@@ -0,0 +1,53 @@
+#                                                      -*- autoconf -*-
+
+cat <<EOF
+
+Base layer.
+
+EOF
+
+dnl AU_DEFUN
+dnl --------
+dnl
+AT_SETUP(m4_wrap)
+
+dnl m4_wrap is used to display the help strings.
+dnl Also, check that commas are not swallowed.  This can easily happen
+dnl because of m4-listification.
+AT_DATA(libm4.in,
+[[include(libm4.m4)divert(0)dnl
+m4_wrap([Short string */], [   ], [/* ], 20)
+
+m4_wrap([Much longer string */], [   ], [/* ], 20)
+
+m4_wrap([Short doc.], [          ], [  --short ], 30)
+
+m4_wrap([Short doc.], [          ], [  --too-wide], 30)
+
+m4_wrap([Super long documentation.], [          ], [  --too-wide], 30)
+
+m4_wrap([First, second  , third, [,quoted]])
+]])
+
+AT_DATA(expout,
+[[/* Short string */
+
+/* Much longer
+   string */
+
+  --short Short doc.
+
+  --too-wide
+          Short doc.
+
+  --too-wide
+          Super long
+          documentation.
+
+First, second , third, [,quoted]
+]])
+
+AT_CHECK([m4 -I $at_top_srcdir libm4.in], 0, expout)
+
+
+AT_CLEANUP()
diff --git a/tests/tools.m4 b/tests/tools.m4
new file mode 100644 (file)
index 0000000..d95679f
--- /dev/null
@@ -0,0 +1,44 @@
+#                                                      -*- autoconf -*-
+
+cat <<EOF
+
+Autoheader, autoupdate...
+
+EOF
+
+dnl actest.m4 AU_ defines OSBOLETE to UPDATED.
+
+
+dnl AH_DEFUN
+dnl --------
+dnl
+dnl We check that both the AH_DEFUN given in auxiliary files and in
+dnl `configure.in' function properly.
+AT_SETUP(AH_DEFUN)
+
+AT_DATA(configure.in,
+[AC_INCLUDE(actest.m4)
+AH_DEFUN(AC_ANAKIN,
+[AH_TEMPLATE(Anakin, [The future Darth Vador?])])
+AC_INIT
+AC_TATOOINE
+AC_ANAKIN
+AC_CONFIG_HEADERS(config.h:config.hin)
+AC_OUTPUT
+])
+
+# The user must know the macro is obsolete.
+AT_CHECK([../autoheader -m .. -l $at_srcdir], 0)
+
+# And autoupdate should update it properly.
+AT_CHECK([cat config.hin], 0,
+[/* config.hin.  Generated automatically from configure.in by autoheader.  */
+
+/* The future Darth Vador? */
+#undef Anakin
+
+/* The planet where Luke was raised. */
+#undef Tatooine
+])
+
+AT_CLEANUP(config.hin)