summaryrefslogtreecommitdiff
path: root/frm/testsuite/frm/test.exp
blob: a12e4aa281753a09ebcf821f1828cfad21ee22f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- tcl -*-
# This file is part of Mailutils testsuite.
# Copyright (C) 2002, 2007, 2009 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
set env(MAIL) $MU_SPOOL_DIR/mbox1
set env(FOLDER) $env(MAIL)

mu_prepare_spools

mu_exec -retcode 1 -message "frm" "Foo Bar\tJabberwocky"\
"Bar\tRe: Jabberwocky"\
"Sergey Poznyakoff\tSimple MIME"\
"Sergey Poznyakoff\tNested MIME"\
"Sergey Poznyakoff\tEmpty MIME Parts"

mu_exec -retcode 1 -message "frm -n" -arg -n \
"   1:\tFoo Bar\tJabberwocky"\
"   2:\tBar\tRe: Jabberwocky"\
"   3:\tSergey Poznyakoff\tSimple MIME"\
"   4:\tSergey Poznyakoff\tNested MIME"\
"   5:\tSergey Poznyakoff\tEmpty MIME Parts"

mu_exec -retcode 1 -message "frm -l" -arg -l \
"(Bar)\tFoo Bar\tJabberwocky"\
"(Foo Bar)\tBar\tRe: Jabberwocky"\
"(Foo Bar)\tSergey Poznyakoff\tSimple MIME"\
"(Foo Bar)\tSergey Poznyakoff\tNested MIME"\
"(Foo Bar)\tSergey Poznyakoff\tEmpty MIME Parts"

mu_exec -retcode 1 -message "frm -qS" -arg -qS \
"Folder contains 5 new messages."

mu_exec -retcode 1 -arg -q -message "frm -q"  \
"There are messages in that folder."

mu_exec -retcode 1 -arg "--set mailbox.folder=\"'$MU_SPOOL_DIR'\"" -arg +mbox -message "frm +mbox" \
"Sergey Poznyakoff\tMBOX"

mu_exec -arg -q -arg %nonexistent -retcode 2 -message "frm -q %nonexistent" \
"No messages in that folder!"    

set env(MAIL) $MU_SPOOL_DIR/bigto.mbox
unset env(FOLDER)
mu_exec -retcode 1 -message "frm -l on long headers" -arg -l \
"(Ayoung-Chee, Nigel Paul -- Nigel Paul Ayoung-Chee)\tPatrick Chan\tNew email address, etc."

#end of test.exp

Return to:

Send suggestions and report system problems to the System administrator.