diff options
Diffstat (limited to 'mail.remote/testsuite')
-rw-r--r-- | mail.remote/testsuite/.gitignore | 7 | ||||
-rw-r--r-- | mail.remote/testsuite/Data | 205 | ||||
-rw-r--r-- | mail.remote/testsuite/Makefile.am | 91 | ||||
-rw-r--r-- | mail.remote/testsuite/lib/DISTFILES | 1 | ||||
-rw-r--r-- | mail.remote/testsuite/lib/mail.remote.exp | 104 | ||||
-rw-r--r-- | mail.remote/testsuite/mail.remote/DISTFILES | 1 | ||||
-rw-r--r-- | mail.remote/testsuite/mail.remote/send.exp | 93 |
7 files changed, 0 insertions, 502 deletions
diff --git a/mail.remote/testsuite/.gitignore b/mail.remote/testsuite/.gitignore deleted file mode 100644 index 989f5903e..000000000 --- a/mail.remote/testsuite/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -*.log -*.sum -site.exp -remote.exp -data diff --git a/mail.remote/testsuite/Data b/mail.remote/testsuite/Data deleted file mode 100644 index 6dd21a60c..000000000 --- a/mail.remote/testsuite/Data +++ /dev/null @@ -1,205 +0,0 @@ -# This file is part of Mailutils testsuite. -# Copyright (C) 2002, 2004, 2007 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -MESSAGE Simple mail -BODY BEGIN -From: gray@gnu.org -To: bug-mailutils@gnu.org -Subject: Simple mail - -This is a simple mail. -Data goes here. -BODY END - -PATTERN BEGIN -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <bug-mailutils@gnu.org> - 0: From: gray@gnu.org - 1: To: bug-mailutils@gnu.org - 2: Subject: Simple mail - 3: - 4: This is a simple mail. - 5: Data goes here. - 6: -END OF MESSAGE -PATTERN END -MESSAGE END - -MESSAGE Explicit from -FROM <gray@localhost> -BODY BEGIN -From: gray@gnu.org -To: bug-mailutils@gnu.org -Subject: Explicit from test. - -This is a simple mail. -Data goes here. -BODY END - -PATTERN BEGIN -ENVELOPE FROM: <gray@localhost> -ENVELOPE TO: <bug-mailutils@gnu.org> - 0: From: gray@gnu.org - 1: To: bug-mailutils@gnu.org - 2: Subject: Explicit from test. - 3: - 4: This is a simple mail. - 5: Data goes here. - 6: -END OF MESSAGE -PATTERN END -MESSAGE END - -MESSAGE Explicit To -TO <alainm@gnu.org> <jbailey@gnu.org> -BODY BEGIN -From: gray@gnu.org -Subject: Expicit destinations - -This is a test for working explicit destinations. -BODY END -PATTERN BEGIN -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <alainm@gnu.org>,<jbailey@gnu.org> - 0: To: <alainm@gnu.org>,<jbailey@gnu.org> - 1: From: gray@gnu.org - 2: Subject: Expicit destinations - 3: - 4: This is a test for working explicit destinations. - 5: -END OF MESSAGE -PATTERN END -MESSAGE END - -MESSAGE CC -BODY BEGIN -From: gray@gnu.org -To: bug-mailutils@gnu.org -Cc: alainm@gnu.org -Subject: Carbon copy test - -CC works. -BODY END -PATTERN BEGIN -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <bug-mailutils@gnu.org>,<alainm@gnu.org> - 0: From: gray@gnu.org - 1: To: bug-mailutils@gnu.org - 2: Cc: alainm@gnu.org - 3: Subject: Carbon copy test - 4: - 5: CC works. - 6: -END OF MESSAGE -PATTERN END -MESSAGE END - -MESSAGE BCC -BODY BEGIN -From: gray@gnu.org -To: alainm@gnu.org -Bcc: bug-mailutils@gnu.org -Subject: Blind carbon copy test. - -Bcc works too. -BODY END -PATTERN BEGIN -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <alainm@gnu.org> - 0: From: gray@gnu.org - 1: To: alainm@gnu.org - 2: Subject: Blind carbon copy test. - 3: - 4: Bcc works too. - 5: -END OF MESSAGE -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <bug-mailutils@gnu.org> - 0: Bcc: bug-mailutils@gnu.org - 1: From: gray@gnu.org - 2: To: alainm@gnu.org - 3: Subject: Blind carbon copy test. - 4: - 5: Bcc works too. - 6: -END OF MESSAGE -PATTERN END -MESSAGE END - -MESSAGE Complex -TO <root@localhost> -BODY BEGIN -From: gray@gnu.org -Cc: "Alain Magloire" <alainm@gnu.org>, "Jeff Bailey" <jbailey@gnu.org> -Bcc: bug-mailutils@gnu.org -Subject: A complex test - -It works? -BODY END -PATTERN BEGIN -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <root@localhost> - 0: To: <root@localhost> - 1: From: gray@gnu.org - 2: Cc: "Alain Magloire" <alainm@gnu.org>, "Jeff Bailey" <jbailey@gnu.org> - 3: Subject: A complex test - 4: - 5: It works? - 6: -END OF MESSAGE -PATTERN END -MESSAGE END - -MESSAGE Complex+Read recipients -OPTIONS -t -TO <root@localhost> -BODY BEGIN -From: gray@gnu.org -Cc: "Alain Magloire" <alainm@gnu.org>, "Jeff Bailey" <jbailey@gnu.org> -Bcc: bug-mailutils@gnu.org -Subject: A complex test - -It works? -BODY END -PATTERN BEGIN -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <root@localhost>,<alainm@gnu.org>,<jbailey@gnu.org> - 0: To: <root@localhost>,<alainm@gnu.org>,<jbailey@gnu.org> - 1: From: gray@gnu.org - 2: Cc: "Alain Magloire" <alainm@gnu.org>, "Jeff Bailey" <jbailey@gnu.org> - 3: Subject: A complex test - 4: - 5: It works? - 6: -END OF MESSAGE -ENVELOPE FROM: <gray@gnu.org> -ENVELOPE TO: <bug-mailutils@gnu.org> - 0: To: <bug-mailutils@gnu.org> - 1: Bcc: bug-mailutils@gnu.org - 2: From: gray@gnu.org - 3: Cc: "Alain Magloire" <alainm@gnu.org>, "Jeff Bailey" <jbailey@gnu.org> - 4: Subject: A complex test - 5: - 6: It works? - 7: -END OF MESSAGE -PATTERN END -MESSAGE END - - -# End of data diff --git a/mail.remote/testsuite/Makefile.am b/mail.remote/testsuite/Makefile.am deleted file mode 100644 index 5444e2db9..000000000 --- a/mail.remote/testsuite/Makefile.am +++ /dev/null @@ -1,91 +0,0 @@ -## Process this file with GNU Automake to create Makefile.in - -## Copyright (C) 2002, 2007 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 this program; if not, write to the Free Software -## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA -## 02110-1301 USA - -AUTOMAKE_OPTIONS = dejagnu -SMTP_DEJATOOL = mail.remote -DEJATOOL = @MU_SMTP_DEJATOOL@ -RUNTESTFLAGS = -CLEANFILES = *.log -test_dirs = lib mail.remote -EXTRA_DIST = Data - -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 top_builddir `cd $(top_builddir); 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,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/mail.remote/testsuite/lib/DISTFILES b/mail.remote/testsuite/lib/DISTFILES deleted file mode 100644 index c46b9858f..000000000 --- a/mail.remote/testsuite/lib/DISTFILES +++ /dev/null @@ -1 +0,0 @@ -mail.remote.exp diff --git a/mail.remote/testsuite/lib/mail.remote.exp b/mail.remote/testsuite/lib/mail.remote.exp deleted file mode 100644 index 4edd19395..000000000 --- a/mail.remote/testsuite/lib/mail.remote.exp +++ /dev/null @@ -1,104 +0,0 @@ -# -*- tcl -*- -# This file is part of Mailutils testsuite. -# Copyright (C) 2002, 2004, 2007 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 USA. - -source $top_srcdir/testsuite/lib/mailutils.exp - -mu_init -noflags -mu_prepare_spools -set mu_filename "$MU_FOLDER_DIR/mta.diag" -set env(MTA_DIAG) "$mu_filename" - -# mail_remote_test [-message MESSAGE][-default (FAIL|XFAIL)] -# [-input INPUT-LIST] -# [-args ARGS][-pattern PATTERN-LIST][PATTERN...] -# INPUT-LIST - List of input strings for MU_TOOL -# PATTERN - Sequence to expect in return. -# MESSAGE - [optional] message to output -# ARGS - Additional arguments to MU_TOOL -proc mail_remote_test { args } { - global MU_TOOL - global top_builddir - global verbose - global suppress_flag; - global mu_filename - upvar timeout timeout - - set default "" - set message "" - set invocation "" - set input "" - set pattern "" - for {set i 0} {$i < [llength $args]} {incr i} { - set a [lindex $args $i] - if {"$a" == "-default"} { - incr i - set default [lindex $args $i] - } elseif {"$a" == "-message"} { - incr i - set message [lindex $args $i] - } elseif {"$a" == "-pattern"} { - incr i - set pattern [lindex $args $i] - } elseif {"$a" == "-input"} { - incr i - set input [lindex $args $i] - } elseif {"$a" == "-args"} { - incr i - set a [lindex $args $i] - if {[llength $a] > 0} { - append invocation $a - } - } else { - set args [lrange $args $i end] - break - } - } - - set res [remote_spawn host "${top_builddir}/examples/mta -bd"] - if { $res < 0 || $res == "" } { - perror "Spawning mta failed." - return 1 - } - - remote_expect host 60 { - -re "\[0-9\]\[0-9\]*" { - set port $expect_out(buffer) - set url "smtp://127.0.0.1:$port" - verbose "URL: $url" 1 - } - default { - perror "Spawning mta failed." - return 1 - } - } - - if {"$message" == ""} { - set message [lindex $args 0] - } - - if $verbose>2 then { - send_user "Message is \"$message\"\n" - } - - return [mailer_test -default $default -message $message \ - -input $input -pattern $pattern -file \ - $mu_filename -args "--mailer $url $invocation"] -} - - diff --git a/mail.remote/testsuite/mail.remote/DISTFILES b/mail.remote/testsuite/mail.remote/DISTFILES deleted file mode 100644 index 6a29f1d22..000000000 --- a/mail.remote/testsuite/mail.remote/DISTFILES +++ /dev/null @@ -1 +0,0 @@ -send.exp diff --git a/mail.remote/testsuite/mail.remote/send.exp b/mail.remote/testsuite/mail.remote/send.exp deleted file mode 100644 index 5723a0b47..000000000 --- a/mail.remote/testsuite/mail.remote/send.exp +++ /dev/null @@ -1,93 +0,0 @@ -# -*- tcl -*- -# This file is part of Mailutils testsuite. -# Copyright (C) 2002, 2004, 2007 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 3 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301 USA. - -set chan [open ${srcdir}/Data r] - -set state 0 -set command "" -for {gets $chan line} {![eof $chan]} {gets $chan line} { - verbose "LINE $line" 1 - switch -regexp -- "$line" { - "^#.*" { } - "^MESSAGE END" { - verbose "MAIL FROM $from" 1 - verbose "MAIL TO $to" 1 - verbose "INPUT $input" 1 - verbose "OPTIONS $options" 1 - verbose "PATTERN $pattern" 1 - set args "" - if {$from != ""} { - append args " --from $from" - } - if {$options != ""} { - append args " $options" - } - if {$to != ""} { - append args " $to" - } - mail_remote_test -message $message -input $input \ - -pattern $pattern -args $args - set state 0 - } - "^MESSAGE" { - regexp "^MESSAGE (.*)" $line dummy message - set from "" - set to "" - set options "" - set input [list] - set pattern [list] - set state 1 - } - "^FROM" { - regexp "^FROM (.*)" $line dummy from - } - "^TO" { - regexp "^TO (.*)" $line dummy to - } - "^OPTIONS" { - regexp "^OPTIONS (.*)" $line dummy options - } - "^BODY BEGIN" { - set state 2 - } - "^BODY END" { - set state 1 - } - "^PATTERN BEGIN" { - set state 3 - } - "^PATTERN END" { - set state 1 - } - "^STOP" { - break - } - default { - if {$state == 2} { - lappend input $line - } elseif {$state == 3} { - lappend pattern $line - } - } - } -} - -close $chan - -# End of send.exp |