* tests/base.m4: Really added to the CVS repository.

* tests/tools.m4: Likewise.
This commit is contained in:
Akim Demaille 2000-02-09 08:36:01 +00:00
parent f14cd77f30
commit d21aeb1510
3 changed files with 102 additions and 0 deletions

View File

@ -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/.

53
tests/base.m4 Normal file
View File

@ -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()

44
tests/tools.m4 Normal file
View File

@ -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)