diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-08-27 10:56:27 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-08-27 10:56:27 +0000 |
commit | 660efec73bc18aa74734598f551ac450ef8658dc (patch) | |
tree | 2c085f8d57e839366b406a4cb00ed7df279b1fe6 /frm | |
parent | 2adc107ceafc8d3279dcfa437b7c4f3d2774498a (diff) | |
download | mailutils-660efec73bc18aa74734598f551ac450ef8658dc.tar.gz mailutils-660efec73bc18aa74734598f551ac450ef8658dc.tar.bz2 |
Added new testsuites
Diffstat (limited to 'frm')
-rw-r--r-- | frm/Makefile.am | 1 | ||||
-rw-r--r-- | frm/testsuite/.cvsignore | 7 | ||||
-rw-r--r-- | frm/testsuite/Makefile.am | 70 | ||||
-rw-r--r-- | frm/testsuite/frm/DISTFILES | 1 | ||||
-rw-r--r-- | frm/testsuite/frm/test.exp | 53 |
5 files changed, 132 insertions, 0 deletions
diff --git a/frm/Makefile.am b/frm/Makefile.am index 4bb9d6b03..9eff96e58 100644 --- a/frm/Makefile.am +++ b/frm/Makefile.am @@ -1,5 +1,6 @@ AUTOMAKE_OPTIONS = ../lib/ansi2knr INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib +SUBDIRS = testsuite bin_PROGRAMS = frm diff --git a/frm/testsuite/.cvsignore b/frm/testsuite/.cvsignore new file mode 100644 index 000000000..989f5903e --- /dev/null +++ b/frm/testsuite/.cvsignore @@ -0,0 +1,7 @@ +Makefile +Makefile.in +*.log +*.sum +site.exp +remote.exp +data diff --git a/frm/testsuite/Makefile.am b/frm/testsuite/Makefile.am new file mode 100644 index 000000000..db921cc74 --- /dev/null +++ b/frm/testsuite/Makefile.am @@ -0,0 +1,70 @@ +AUTOMAKE_OPTIONS = dejagnu +DEJATOOL = frm +RUNTESTFLAGS = +CLEANFILES = *.log +test_dirs = frm + +dist-hook: + here=`cd $(top_builddir)/$(subdir) && pwd`; \ + srcdir=`cd $(srcdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + for dir in $(test_dirs); \ + do \ + cd $$srcdir;\ + mkdir $$distdir/$$dir;\ + cd $$dir;\ + for file in DISTFILES `cat DISTFILES`; do \ + d=$$srcdir/$$dir; \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $$distdir/$$dir/$$file; \ + else \ + test -f $$distdir/$$dir/$$file \ + || cp -p $$d/$$file $$distdir/$$dir/$$file || exit; \ + fi; \ + done;\ + done;\ + cd $$here + +site.exp: Makefile remote.exp + @echo 'Making a new site.exp file...' + @test ! -f site.bak || rm -f site.bak + @echo '## these variables are automatically generated by make ##' > $@-t + @echo '# Do not edit here. If you wish to override these values' >> $@-t + @echo '# edit the last section' >> $@-t + @echo 'set tool $(DEJATOOL)' >> $@-t + @echo "set top_srcdir `cd $(top_srcdir); pwd`" >> $@-t + @echo "set srcdir `cd $(srcdir); pwd`" >> $@-t + @echo 'set objdir' `pwd` >> $@-t + @echo 'set host_alias "$(host_alias)"' >> $@-t + @echo 'set host_triplet $(host_triplet)' >> $@-t + @echo 'set target_alias "$(target_alias)"' >> $@-t + @echo 'set target_triplet $(target_triplet)' >> $@-t + @echo 'set build_alias "$(build_alias)"' >> $@-t + @echo 'set build_triplet $(build_triplet)' >> $@-t + @echo '## All variables above are generated by configure. Do Not Edit ##' >> $@-t + @test ! -f site.exp || sed '1,/^## All variables above are.*##/ d' site.exp >> $@-t + @test ! -f site.exp || mv site.exp site.bak + @mv $@-t site.exp + +remote.exp:; + @echo 'Making a new remote.exp file...' + @test ! -f remote.bak || rm -f remote.bak + @echo '## These variables are used to set up for the remote testing.' >> $@-t + @echo '## Please, read file README in this directory for instructions' >> $@-t + @echo '## on how to use this file' >> $@-t + @echo "set host_board `hostname`" >> $@-t + @echo 'set board_info($$host_board,connect) rlogin' >> $@-t + @echo 'set board_info($$host_board,shell_prompt) "\\$$ "' >> $@-t + @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); pwd`" >> $@-t + @echo "set board_info(\$$host_board,srcdir) `cd $(srcdir); pwd`" >> $@-t + @echo "set board_info(\$$host_board,objdir) `pwd`" >> $@-t + @echo "set board_info(\$$host_board,top_srcdir) `cd $(top_srcdir); pwd`" >> $@-t + @echo "set board_info(\$$host_board,top_builddir) `cd $(top_builddir); pwd`" >> $@-t + @test ! -f remote.exp || mv remote.exp remote.bak + @mv $@-t remote.exp + + +DISTCLEANFILES=*.exp *.log *.sum + +distclean-local: + -rm -rf data diff --git a/frm/testsuite/frm/DISTFILES b/frm/testsuite/frm/DISTFILES new file mode 100644 index 000000000..8382c6bf8 --- /dev/null +++ b/frm/testsuite/frm/DISTFILES @@ -0,0 +1 @@ +test.exp
\ No newline at end of file diff --git a/frm/testsuite/frm/test.exp b/frm/testsuite/frm/test.exp new file mode 100644 index 000000000..a762930ec --- /dev/null +++ b/frm/testsuite/frm/test.exp @@ -0,0 +1,53 @@ +# -*- tcl -*- +# This file is part of Mailutils testsuite. +# Copyright (C) 2002, Free Software Foundation +# +# 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 2 of the License, 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, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +source $top_srcdir/testsuite/lib/mailutils.exp + +mu_init +set env(MAIL) $MU_SPOOL_DIR/mbox1 + +mu_prepare_spools + +mu_exec -retcode 1 -message "frm" "Foo Bar\tJabberwocky"\ +"Bar\tRe: Jabberwocky"\ +"Sergey Poznyakoff\tSimple MIME"\ +"Sergey Poznyakoff\tNested MIME" + +mu_exec -retcode 1 -message "frm -n" -arg -n \ +"1: Foo Bar\tJabberwocky"\ +"2: Bar\tRe: Jabberwocky"\ +"3: Sergey Poznyakoff\tSimple MIME"\ +"4: Sergey Poznyakoff\tNested MIME" + +mu_exec -retcode 1 -message "frm -l" -arg -l \ +"(Bar) Foo Bar\tJabberwocky"\ +"(Foo Bar) Bar\tRe: Jabberwocky"\ +"(Foo Bar) Sergey Poznyakoff\tSimple MIME"\ +"(Foo Bar) Sergey Poznyakoff\tNested MIME"\ + +mu_exec -retcode 1 -message "frm -qS" -arg -qS \ +"You have 4 messages" + +mu_exec -retcode 1 -arg %mbox -message "frm %mbox" \ +"Sergey Poznyakoff\tMBOX" + +mu_exec -retcode 1 -arg -q -message "frm -q" + +mu_exec -arg -q -arg %nonexistent -retcode 2 -message "frm -q %nonexistent" + +#end of test.exp
\ No newline at end of file |