Commit 588db737 588db737f3955252de12ba32b6df235d3663084f by Sergey Poznyakoff

Testcase for decoding rfc 2047 strings.

1 parent 486c3636
1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2003, 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 mailbox_run ${top_builddir}/examples/decode2047 -p
20
21 set chan [open ${srcdir}/RFC2047 r]
22
23 set command ""
24 for {gets $chan line} {![eof $chan]} {gets $chan line} {
25 switch -regexp -- "$line" {
26 "^#.*" { }
27 "^[^ \t].*=>.*" {
28 regexp "(.*)=>.*" $line dummy command
29 set pattern [list $line]
30 }
31 "^\$" {
32 if {$command != ""} {
33 verbose "COMMAND $command"
34 verbose "PATTERN $pattern"
35 mailbox_test -pattern $pattern $command
36 set command ""
37 }
38 }
39 default {
40 if [info exist pattern] {
41 set pattern [concat $pattern [list $line]]
42 }
43 }
44 }
45 }
46
47 close $chan
48
49 # end of address.exp