[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] tests: better coverage for AC_CONFIG_MACRO_DIRS
From: |
Stefano Lattarini |
Subject: |
[PATCH 3/4] tests: better coverage for AC_CONFIG_MACRO_DIRS |
Date: |
Fri, 2 Nov 2012 13:27:10 +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 0/2] AC_CONFIG_MACRO_DIRS: implementation and documentation, Nick Bowler, 2012/11/02
- Re: [PATCH 0/2] AC_CONFIG_MACRO_DIRS: implementation and documentation, Stefano Lattarini, 2012/11/02
- Re: [PATCH 0/2] AC_CONFIG_MACRO_DIRS: implementation and documentation, Stefano Lattarini, 2012/11/02
- [PATCH] warn: new special syntax warning, hack for aclocal (was: Re: [PATCH 0/2] AC_CONFIG_MACRO_DIRS: implementation and documentation), Stefano Lattarini, 2012/11/02
- Re: [PATCH] warn: new special syntax warning, hack for aclocal, Eric Blake, 2012/11/02
- Re: [PATCH] warn: new special syntax warning, hack for aclocal, Stefano Lattarini, 2012/11/02