source: trunk/test/yat_msg_error_test.sh @ 3227

Last change on this file since 3227 was 3227, checked in by Peter, 9 years ago

improve 'required' field. The tests use aclocal via the bootstrap function but did not require automake or aclocal. This fixes that.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1#! /bin/sh
2# $Id: yat_msg_error_test.sh 3227 2014-05-17 02:12:20Z peter $
3#
4# Copyright (C) 2011, 2012, 2013 Peter Johansson
5#
6# This file is part of the yat library, http://dev.thep.lu.se/yat
7#
8# The yat library is free software; you can redistribute it
9# and/or modify it under the terms of the GNU General Public License as
10# published by the Free Software Foundation; either version 3 of the
11# License, or (at your option) any later version.
12#
13# The yat library is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with yat. If not, see <http://www.gnu.org/licenses/>.
20
21
22# test macros in m4/yat_msg_error.m4
23
24required="autoconf aclocal"
25
26set -e
27
28. ./test/init.sh || exit 99
29
30specific_msg='some specific message a51965'
31
32cat >> configure.ac <<EOF
33YAT_MSG_ERROR([$specific_msg])
34AC_PREREQ([2.63])
35AC_MSG_CHECKING([for something more])
36AC_MSG_RESULT([no])
37YAT_MSG_ERROR([could not find something more])
38AC_COMPILE_IFELSE([AC_LANG_PROGRAM])
39AC_CONFIG_FILES([Makefile])
40AC_OUTPUT
41EOF
42
43echo "@configure_input@" > Makefile.in
44
45bootstrap
46rm -f config.status
47run ./configure 1 $configure_opts
48grep "$specific_msg" stderr || exit_fail
49grep "$specific_msg" config.log || exit_fail
50
51# configure should abort before config.status creates Makefile
52test -f Makefile && exit_fail
53
54grep 'for something more' stdout || exit_fail
55exit_success
Note: See TracBrowser for help on using the repository browser.