diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-09-15 18:18:45 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-09-15 18:18:45 +0000 |
commit | d6f4adec375f9f50186248462f2774d9dc6ae59e (patch) | |
tree | f14db666fc20057afd49eafab74853283a0a189e /tests | |
parent | 0c131cad2530e765bee43fa445d8f5ac991a7711 (diff) | |
download | mailfromd-d6f4adec375f9f50186248462f2774d9dc6ae59e.tar.gz mailfromd-d6f4adec375f9f50186248462f2774d9dc6ae59e.tar.bz2 |
Add a test suite for aliases.
* tests/alias.at: New file.
* tests/Makefile.am (TESTSUITE_AT): Add alias.at
* tests/testsuite.at: Add alias.at.
git-svn-id: file:///svnroot/mailfromd/trunk@1668 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/alias.at | 46 | ||||
-rw-r--r-- | tests/testsuite.at | 2 |
3 files changed, 49 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index fa3f09c5..7239b293 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -42,6 +42,7 @@ $(srcdir)/package.m4: $(top_srcdir)/configure.ac TESTSUITE_AT = \ accept.at\ ack.at\ + alias.at\ arg.at\ ashadow.at\ bctx00.at\ diff --git a/tests/alias.at b/tests/alias.at new file mode 100644 index 00000000..4b903ca3 --- /dev/null +++ b/tests/alias.at @@ -0,0 +1,46 @@ +# This file is part of Mailfromd testsuite. -*- Autotest -*- +# Copyright (C) 2008 Sergey Poznyakoff +# +# This program 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 this program. If not, see <http://www.gnu.org/licenses/>. + +AT_SETUP([Function aliases]) +AT_KEYWORDS([alias]) + +MF_CHECK_TEXT([ +func foo(string a) + alias bar + alias baz + returns string +do + return %a "." __function__ +done + +prog envfrom +do + echo foo("a") + echo bar("b") + echo baz("c") +done], +[], +[EX_OK], +[State envfrom: continue +], +[a.foo +b.foo +c.foo +]) + +AT_CLEANUP + + diff --git a/tests/testsuite.at b/tests/testsuite.at index 77e5b7e3..9e41c175 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -85,6 +85,8 @@ m4_include([ack.at]) m4_include([arg.at]) m4_include([farg.at]) +m4_include([alias.at]) + m4_include([bctx00.at]) m4_include([bctx01.at]) |