[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCHv2 3/8] tests: better coverage for AC_CONFIG_MACRO_DIRS
From: |
Stefano Lattarini |
Subject: |
[PATCHv2 3/8] tests: better coverage for AC_CONFIG_MACRO_DIRS |
Date: |
Sat, 10 Nov 2012 14:55:52 +0100 |
Suggested by a report from Nick Bowler:
<http://lists.gnu.org/archive/html/autoconf-patches/2012-11/msg00000.html>
* t/aclocal-macrodirs.tap: Enhance to check use of extra whitespaces
and newline characters in the arguments to AC_CONFIG_MACRO_DIRS. This
test currently fails, so mark it as "TODO". While at it, throw in other
minor edits and enhancements.
Signed-off-by: Stefano Lattarini <address@hidden>
---
t/aclocal-macrodirs.tap | 43 +++++++++++++++++++++++++++++++++++--------
1 file changed, 35 insertions(+), 8 deletions(-)
diff --git a/t/aclocal-macrodirs.tap b/t/aclocal-macrodirs.tap
index 2440d8f..9350b87 100755
--- a/t/aclocal-macrodirs.tap
+++ b/t/aclocal-macrodirs.tap
@@ -26,7 +26,7 @@ am_create_testdir=empty
END
} || skip_all_ "autoconf doesn't define the AC_CONFIG_MACRO_DIRS macro"
-plan_ 11
+plan_ 12
ocwd=$(pwd) || fatal_ "getting current working directory"
ACLOCAL_PATH=; unset ACLOCAL_PATH
@@ -99,18 +99,21 @@ test_end
#---------------------------------------------------------------------------
-two_dirs_check ()
+three_dirs_check ()
{
- mkdir dir1 dir2
+ mkdir dir1 dir2 dir3
echo 'AC_DEFUN([MY_FOO], [::my::foo::])' > dir1/foo.m4
echo 'AC_DEFUN([MY_BAR], [!!my!!bar!!])' > dir2/zap.m4
+ echo 'AC_DEFUN([MY_BAZ], [==my==baz==])' > dir3/0.m4
$ACLOCAL \
&& $FGREP 'm4_include([dir1/foo.m4])' aclocal.m4 \
&& $FGREP 'm4_include([dir2/zap.m4])' aclocal.m4 \
+ && $FGREP 'm4_include([dir3/0.m4])' aclocal.m4 \
&& $AUTOCONF \
- && not $EGREP 'MY_(FOO|BAR)' configure \
+ && not $EGREP 'MY_(FOO|BAR|BAZ)' configure \
&& $FGREP '::my::foo::' configure \
&& $FGREP '!!my!!bar!!' configure \
+ && $FGREP '==my==baz==' configure \
|| r='not ok'
}
@@ -120,12 +123,13 @@ test_begin "AC_CONFIG_MACRO_DIRS: several arguments"
cat > configure.ac <<'END'
AC_INIT([more-args], [0.2])
-AC_CONFIG_MACRO_DIRS([dir1 dir2])
+AC_CONFIG_MACRO_DIRS([dir1 dir2 dir3])
MY_FOO
MY_BAR
+MY_BAZ
END
-two_dirs_check
+three_dirs_check
test_end
@@ -136,12 +140,35 @@ test_begin "AC_CONFIG_MACRO_DIRS: several calls"
cat > configure.ac <<'END'
AC_INIT([more-calls], [2.0])
AC_CONFIG_MACRO_DIRS([dir1])
-AC_CONFIG_MACRO_DIRS([dir2])
+AC_CONFIG_MACRO_DIRS([dir2 dir3])
+MY_FOO
+MY_BAR
+MY_BAZ
+END
+
+three_dirs_check
+
+test_end
+
+#---------------------------------------------------------------------------
+
+test_begin "AC_CONFIG_MACRO_DIRS: extra whitespace" TODO
+
+bslash=\\
+
+cat > configure.ac <<END
+AC_INIT([more-args], [0.2])
+AC_CONFIG_MACRO_DIRS([ dir1${bslash}
+${tab} dir2 ${tab}${tab}dir3
+${bslash}
+
+])
MY_FOO
MY_BAR
+MY_BAZ
END
-two_dirs_check
+three_dirs_check
test_end
--
1.8.0
- Re: [PATCH 1/6] aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS, (continued)
[PATCHv2 0/8] Support for AC_CONFIG_MACRO_DIRS in Automake, Stefano Lattarini, 2012/11/10
- [PATCHv2 1/8] aclocal: multiple local m4 macro dirs with AC_CONFIG_MACRO_DIRS, Stefano Lattarini, 2012/11/10
- [PATCHv2 2/8] aclocal: diagnose non-existing directories in AC_CONFIG_MACRO_DIRS better, Stefano Lattarini, 2012/11/10
- [PATCHv2 3/8] tests: better coverage for AC_CONFIG_MACRO_DIRS,
Stefano Lattarini <=
- [PATCHv2 4/8] aclocal: smash newlines in arguments of traced macros, Stefano Lattarini, 2012/11/10
- [PATCHv2 5/8] coverage: expose a bug in aclocal (spurious warnings), Stefano Lattarini, 2012/11/10
- [PATCHv2 6/8] aclocal: avoid spurious warnings from autom4te with AC_CONFIG_MACRO_DIRS, Stefano Lattarini, 2012/11/10
- [PATCHv2 7/8] aclocal: trace AC_CONFIG_MACRO_DIR_TRACE, Stefano Lattarini, 2012/11/10
- [PATCHv2 8/8] news: we trace AC_CONFIG_MACRO_DIRS, Stefano Lattarini, 2012/11/10
- Re: [PATCHv2 0/8] Support for AC_CONFIG_MACRO_DIRS in Automake, Stefano Lattarini, 2012/11/10