source: trunk/test/yat_msg_error_test.sh @ 3130

Last change on this file since 3130 was 3130, checked in by Peter, 8 years ago

merge release 0.11 into trunk

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