Commit 501b3590 501b359050d179ef944e2b6ed3d3d567d658a73c by Sergey Poznyakoff

Test "tag" command and message selection.

1 parent a71cd32b
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, Free Software Foundation
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 mail_start "--file=%teaparty.mbox"
20 mail_command "set readonly"
21
22 mail_test "from 1,2,5-7 9" \
23 ">N 1 March Hare Sun Jul 21 20:46 10/307 Invitation"\
24 " N 2 Alice Sun Jul 21 20:46 10/317 Re: Invitation"\
25 " N 5 March Hare Sun Jul 21 20:46 10/358 Re: Invitation"\
26 " N 6 Alice Sun Jul 21 20:46 11/373 Re: Invitation"\
27 " N 7 March Hare Sun Jul 21 20:46 10/321 Personal remark"\
28 " N 9 March Hare Sun Jul 21 20:46 10/350 Riddle (was Re: Personal "
29 mail_test "from ^" \
30 ">N 1 March Hare Sun Jul 21 20:46 10/307 Invitation"
31
32 mail_test "from $" \
33 " N 95 Alice Sun Jul 21 20:46 11/385 Thoughts"
34
35 # FIXME: not yet functional
36 #mail_test "from hatter"
37
38 mail_test "tag from:/dormouse/"
39 mail_test "from :t" \
40 " T 17 Dormouse Sun Jul 21 20:46 12/448 Re: Be specific"\
41 " T 31 Dormouse Sun Jul 21 20:46 11/370 Re: Remark"\
42 " T 49 Dormouse Sun Jul 21 20:46 10/355 Re: Discussing Time"\
43 " T 61 Dormouse Sun Jul 21 20:46 11/388 Re: Request for a story"\
44 " T 65 Dormouse Sun Jul 21 20:46 12/477 Story (was Re: Request fo"\
45 " T 67 Dormouse Sun Jul 21 20:46 10/319 Re: Story"\
46 " T 69 Dormouse Sun Jul 21 20:46 10/321 Re: Story"\
47 " T 77 Dormouse Sun Jul 21 20:46 10/320 Re: Story"\
48 " T 79 Dormouse Sun Jul 21 20:46 11/364 Re: Story"\
49 " T 81 Dormouse Sun Jul 21 20:46 11/384 Re: Story"\
50 " T 83 Dormouse Sun Jul 21 20:46 10/306 Re: Story"\
51 " T 88 Dormouse Sun Jul 21 20:46 10/328 Re: Story"\
52 " T 89 Dormouse Sun Jul 21 20:46 11/396 Re: Story"\
53 " T 91 Dormouse Sun Jul 21 20:46 10/306 Re: Story"\
54 " T 92 Dormouse Sun Jul 21 20:46 13/493 Re: Story"
55
56 mail_command "untag :t"
57
58 mail_test "from :t"
59
60 # FIXME: This should be a single command, actually. But readline's echo
61 # seems to split so that mail_command fails.
62 mail_command "tag subject:/invitation/ subject:/riddle/ subject:/time/"
63 mail_command "tag subject:/watch/ subject:/specific/ subject:/guess/"
64 mail_command "tag subject:/story/"
65
66 mail_test "from :T" \
67 " N 7 March Hare Sun Jul 21 20:46 10/321 Personal remark"\
68 " N 8 Alice Sun Jul 21 20:46 10/364 Re: Personal remark"\
69 " N 30 Hatter Sun Jul 21 20:46 10/333 Remark"\
70 " N 31 Dormouse Sun Jul 21 20:46 11/370 Re: Remark"\
71 " N 71 March Hare Sun Jul 21 20:46 10/307 Remark"\
72 " N 72 Alice Sun Jul 21 20:46 11/336 Re: Remark"\
73 " N 73 Hatter Sun Jul 21 20:46 11/364 Re: Remark"\
74 " N 74 Alice Sun Jul 21 20:46 10/323 Personal remark"\
75 " N 75 Hatter Sun Jul 21 20:46 10/336 Re: Personal remark"\
76 " N 84 Hatter Sun Jul 21 20:46 11/357 Let's move"\
77 " N 94 Hatter Sun Jul 21 20:46 10/317 Rude remark"\
78 " N 95 Alice Sun Jul 21 20:46 11/385 Thoughts"
79
80 mail_command "untag :t"
81
82 #FIXME: should be 'mail_command "print 2"'
83 mail_test "print 2" \
84 "Received: (from alice@wonder.land) "\
85 " by wonder.land id 3d3b1d91"\
86 " for hare@wonder.land; Sun, 21 Jul 2002 23:46:09 EEST"\
87 "Date: Sun, 21 Jul 2002 23:46:09 EEST"\
88 "From: Alice <alice@wonder.land>"\
89 "Message-Id: <200207212346.3d3b1d91@wonder.land>"\
90 "To: March Hare <hare@wonder.land>"\
91 "Subject: Re: Invitation"\
92 ""\
93 "I don't see any wine"
94
95 mail_test "from :r" \
96 ">R 2 Alice Sun Jul 21 20:46 10/317 Re: Invitation"
97
98 # End of tag.exp
...\ No newline at end of file ...\ No newline at end of file