diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-11-02 10:09:36 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-11-10 10:21:08 +0100 |
commit | 9018a126345d53a83b0666e7e44e8b1d0d1bb8ee (patch) | |
tree | 8bb2583af5a62478d7586868814ffaab031dbbde | |
parent | fd60ad28737e90d8732f28ce85d6cdaa781bdeed (diff) | |
download | automake-9018a126345d53a83b0666e7e44e8b1d0d1bb8ee.tar.gz |
tests: better coverage for AC_CONFIG_MACRO_DIRS
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 <stefano.lattarini@gmail.com>
-rwxr-xr-x | t/aclocal-macrodirs.tap | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/t/aclocal-macrodirs.tap b/t/aclocal-macrodirs.tap index 2440d8f3f..9350b8734 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 |