testsuite.at 2.09 KB
# This file is part of GNU Mailutils. -*- Autotest -*-
# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
#
# GNU Mailutils is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>.
# This file is part of Mailfromd testsuite. 

m4_include([testsuite.inc])

dnl ------------------------------------------------------------
m4_define([MU_TEST_GROUP],[generic])
dnl ------------------------------------------------------------
m4_define([MU_TEST_KEYWORDS])
dnl ------------------------------------------------------------
m4_define([MU_TEST_COMMAND])

m4_define([mu_trimstr],[m4_if([$2],-1,[$1],[m4_substr($1,0,$2)...])])
m4_define([mu_firstline],[mu_trimstr([$1],m4_index([$1],[
]))])

dnl ------------------------------------------------------------
dnl MU_GENERIC_TEST([NAME], [KW = `'], [INPUT],
dnl                 [CODE], [STDOUT = `'], [STDERR = `'],
dnl                 [RUN-IF-FAIL], [RUN-IF-PASS])
dnl
dnl NAME        $1
dnl KW          $2
dnl INPUT       $3
dnl CODE        $4
dnl STDOUT      $5
dnl STDERR      $6
dnl RUN-IF-FAIL $7
dnl RUN-IF-PASS $8
dnl
m4_define([MU_GENERIC_TEST],[
AT_SETUP([m4_if(MU_TEST_GROUP,[],,MU_TEST_GROUP: )m4_if([$1],[],mu_firstline([$3]),[$1])])
AT_KEYWORDS([MU_TEST_KEYWORDS $2])
AT_CHECK([
AT_DATA([input],[$3
])
MU_TEST_COMMAND < input],[$4],[$5],[$6],[$7],[$8])
AT_CLEANUP
])

AT_INIT

m4_include([list.at])
m4_include([address.at])
m4_include([argcv.at])
m4_include([mime.at])
m4_include([url.at])
m4_include([mailcap.at])
m4_include([base64e.at])
m4_include([base64d.at])
m4_include([decode2047.at])
m4_include([encode2047.at])