* (TESTPAT): add test driver for FLIM-FLAM.
authorakr <akr>
Sat, 18 Jul 1998 06:04:43 +0000 (06:04 +0000)
committerakr <akr>
Sat, 18 Jul 1998 06:04:43 +0000 (06:04 +0000)
ChangeLog
TESTPAT

index a25946f..d060c7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1998-07-18  Tanaka Akira  <akr@jaist.ac.jp>
+
+       * (TESTPAT): add test driver for FLIM-FLAM.
+
 1998-07-16  Tanaka Akira  <akr@jaist.ac.jp>
 
        * (TESTPAT): change format to s-exp.
 \f
 1998-07-01  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM: Version 1.8.0 (\e-DÒkubo)\e-A was released.
+       * FLIM: Version 1.8.0 (\e.D\eNRkubo) was released.\e*B
 
        * README.en: Delete `How to use'.
 
 \f
 1998-06-28  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM-Chao: Version 1.7.0 (Goj\e-Dò)\e-A was released.
+       * FLIM-Chao: Version 1.7.0 (Goj\e.D\eNr) was released.\e*B
 
 1998-06-26  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
 \f
 1998-06-19  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM: Version 1.4.1 (Momoyama-Gory\e-Dòmae)\e-A was released.
+       * FLIM: Version 1.4.1 (Momoyama-Gory\e.D\eNrmae) was released.\e*B
 
 1998-06-18  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
 \f
 1998-05-06  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM: Version 1.2.0 (J\e-Dþêò©\e-A was released.
+       * FLIM: Version 1.2.0 (J\e.D\eN~\eNj\eNr\eN) was released.\e*B
 
        * README.en (What's FLIM): Delete description about
        std11-parse.el; add description about mailcap.el.
 \f
 1998-05-05  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM: Version 1.1.0 (T\e-Dòêi)\e-A was released.
+       * FLIM: Version 1.1.0 (T\e.D\eNr\eNji) was released.\e*B
 
 1998-05-04  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
 \f
 1998-04-17  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
-       * FLIM: Version 1.0.1 (Ky\e-Dòôo)\e-A was released.
+       * FLIM: Version 1.0.1 (Ky\e.D\eNr\eNto) was released.\e*B
 
        * mime-def.el (mime-spadework-module-version-string): New
        constant.
diff --git a/TESTPAT b/TESTPAT
index 69a4053..7b7402c 100644 (file)
--- a/TESTPAT
+++ b/TESTPAT
 ;----------------------------------------------------------------------------
 ;-------- This sequece of hyphens is 76 bytes long. -------------------------
 ;----------------------------------------------------------------------------
+
+; options:
+;encode-sticked-comment-as-atom         ; violate policy preventing structure
+;ignore-75bytes-limit                   ; violate RFC2047
+;ignore-76bytes-limit                   ; violate RFC2047
+;permit-sticked-comment                 ; violate RFC2047
+;permit-sticked-special                 ; violate RFC2047
+;separate-sticked-comment               ; violate policy preserving absence of space
+;separate-sticked-special               ; violate policy preserving absence of space
+;zero-characters-encoded-word-hack      ; violate common sense (very tricky)
+
+;;; test driver for FLIM-FLAM (and FLIM)
+
+(defun decode (src dsts &rest opts)
+  (setq eword-lexical-analyze-cache nil)
+  (setq eword-decode-sticked-encoded-word nil)
+  (setq eword-decode-quoted-encoded-word nil)
+  (if (memq 'permit-sticked-comment opts) (setq eword-decode-sticked-encoded-word t))
+  (if (stringp dsts) (setq dsts (list dsts)))
+  (with-temp-buffer
+    (insert src "\nDummy-Header: \n" mail-header-separator)
+    (eword-decode-header 'us-ascii)
+    (goto-char (point-min))
+    (std11-field-end)
+    (let ((result (buffer-substring (point-min) (point))))
+      (if (member result dsts)
+         t
+       result))))
+
+(defun encode (src dsts &rest opts)
+  (if (stringp dsts) (setq dsts (list dsts)))
+  (with-temp-buffer
+    (insert src "\nDummy-Header: \n" mail-header-separator)
+    (goto-char (point-min))
+    (eword-encode-header 'us-ascii)
+    (goto-char (point-min))
+    (std11-field-end)
+    (let ((result (buffer-substring (point-min) (point))))
+      (if (member result dsts)
+         t
+       result))))
+
+;;; from RFC2047
+
+(decode
+"From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>"
+"From: Keith Moore <moore@cs.utk.edu>")
+
+(decode
+"To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>"
+"To: Keld J\e.A\eNxrn Simonsen <keld@dkuug.dk>")\e*B
+
+(decode
+"CC: =?ISO-8859-1?Q?Andr=E9?= Pirard <PIRARD@vm1.ulg.ac.be>"
+"CC: Andr\e.A\eNi Pirard <PIRARD@vm1.ulg.ac.be>")\e*B
+
+(decode
+"Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
+ =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?="
+"Subject: If you can read this you understand the example.")
+
+(decode
+"From: =?ISO-8859-1?Q?Olle_J=E4rnefors?= <ojarnef@admin.kth.se>"
+"From: Olle J\e.A\eNdrnefors <ojarnef@admin.kth.se>")\e*B
+
+(decode
+"From: =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= <paf@nada.kth.se>"
+"From: Patrik F\e.A\eNdltstr\eNvm <paf@nada.kth.se>")\e*B
+
+(decode
+"From: Nathaniel Borenstein <nsb@thumper.bellcore.com>
+       (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)"
+"From: Nathaniel Borenstein <nsb@thumper.bellcore.com> (\e.H\eNm\eNe\eNl\eNy \eNo\eNa \eNi\eNl\eNh\eNt\eNp)")\e*B
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?=)"
+"From: foo@bar.baz (a)")
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?= b)"
+"From: foo@bar.baz (a b)")
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)"
+"From: foo@bar.baz (ab)")
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)"
+"From: foo@bar.baz (ab)")
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?=
+       =?ISO-8859-1?Q?b?=)"
+"From: foo@bar.baz (ab)")
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a_b?=)"
+"From: foo@bar.baz (a b)")
+
+(decode
+"From: foo@bar.baz (=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)"
+"From: foo@bar.baz (a b)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a?=)"
+"Subject: (=?ISO-8859-1?Q?a?=)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a?= b)"
+"Subject: (=?ISO-8859-1?Q?a?= b)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)"
+"Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)"
+"Subject: (=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a?=
+       =?ISO-8859-1?Q?b?=)"
+"Subject: (=?ISO-8859-1?Q?a?=  =?ISO-8859-1?Q?b?=)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a_b?=)"
+"Subject: (=?ISO-8859-1?Q?a_b?=)")
+
+(decode
+"Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)"
+"Subject: (=?ISO-8859-1?Q?a?= =?ISO-8859-2?Q?_b?=)")
+
+;;; by akr@jaist.ac.jp
+
 (decode
 "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= <akr@jaist.ac.jp>"
 "From: \e$B$"\e(B <akr@jaist.ac.jp>")
 
+(encode
+"From: \e$B$"\e(B <akr@jaist.ac.jp>"
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= <akr@jaist.ac.jp>")
+
 (decode
 "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?=
  <akr@jaist.ac.jp>"
 (decode
 "From: akr@jaist.ac.jp
  (=?ISO-2022-JP?B?GyRCJCIbKEI=?=a=?ISO-2022-JP?B?GyRCJCQbKEI=?=)"
-"From: akr@jaist.ac.jp
- (=?ISO-2022-JP?B?GyRCJCIbKEI=?=a=?ISO-2022-JP?B?GyRCJCQbKEI=?=)")
+"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=a=?ISO-2022-JP?B?GyRCJCQbKEI=?=)")
 
 (decode
 "From: akr@jaist.ac.jp
 "From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)"
 'ignore-76bytes-limit)
 
+(encode
+"From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)"
+"From: akr@jaist.ac.jp
+ (=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
+'ignore-76bytes-limit)
+
 (decode
 "From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
  =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=
  =?ISO-2022-JP?B?GyhC?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
 "From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)")
 
+(encode
+"From: akr@jaist.ac.jp (\e$B$"\e(B(\e$B$$\e(B)\e$B$&\e(B)"
+"From: akr@jaist.ac.jp (=?ISO-2022-JP?B?GyRCJCIbKEI=?=
+ =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=
+ =?ISO-2022-JP?B?GyhC?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)"
+'zero-characters-encoded-word-hack)
+
 (decode
 "From: a=?ISO-2022-JP?B?GyRCJCIbKEI=?= <akr@jaist.ac.jp>"
 "From: a=?ISO-2022-JP?B?GyRCJCIbKEI=?= <akr@jaist.ac.jp>")
 'permit-sticked-comment)
 
 (decode
-"From: (a)\e$B$"\e(B(b) <akr@jaist.ac.jp>"
 "From: (a)=?ISO-2022-JP?B?GyRCJCIbKEI=?=(b) <akr@jaist.ac.jp>"
+"From: (a)\e$B$"\e(B(b) <akr@jaist.ac.jp>"
 'permit-sticked-comment)
 
 (decode
 "From: (=?US-ASCII?Q?(?=)foo@bar.baz(=?US-ASCII?Q?))baz@bar.foo(?=)"
 "From: (=?US-ASCII?Q?(?=)foo@bar.baz(=?US-ASCII?Q?))baz@bar.foo(?=)")
 
+(encode
+"From: \"\e$B$"\e(B(\e$B$"\e(B)\" <akr@jaist.ac.jp>"
+"From: =?ISO-2022-JP?B?GyRCJCIbKEIoGyRCJCIbKEIp?= <akr@jaist.ac.jp>")
+
 (decode
 "From: =?ISO-2022-JP?B?GyRCJCIbKEIoGyRCJCIbKEIp?= <akr@jaist.ac.jp>"
 "From: \"\e$B$"\e(B(\e$B$"\e(B)\" <akr@jaist.ac.jp>")
 'separate-sticked-comment)
 
 (decode
+"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)
+ <akr@jaist.ac.jp>"
+"From: \e$B$"\e(B(\e$B$"\e(B) <akr@jaist.ac.jp>"
+'permit-sticked-comment)
+
+(decode
+"From: =?ISO-2022-JP?B?YSJiGyRCJCIbKEJjXAo=?= <akr@jaist.ac.jp>"
+"From: \"a\"b\e$B$"\e(Bc\\\" <akr@jaist.ac.jp>")
+
+(encode
+"From: "a\"b\e$B$"\e(B\\" <akr@jaist.ac.jp>"
+"From: =?ISO-2022-JP?B?YSJiGyRCJCIbKEJjXAo=?= <akr@jaist.ac.jp>")
+
+(decode
 "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=<akr@jaist.ac.jp>"
 "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=<akr@jaist.ac.jp>")
 
 "Subject: =?ISO-2022-JP?B?DQoNCg==?="
 "Subject: ")
 
+(encode
+"Subject: \e$B0$\e(B                                                                                                                          \e$BR_\e(B"
+"Subject: =?ISO-2022-JP?B?GyRCMCQbKEIgICAgICAgICAgICAgICAgICAgICAgICAgICAg?=
+ =?US-ASCII?Q?____________________________________________________________?=
+ =?ISO-2022-JP?B?ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBskQlJfGyhC?=")
+
+(decode
+"Subject: =?ISO-2022-JP?B?GyRCMCQbKEIgICAgICAgICAgICAgICAgICAgICAgICAgICAg?=
+ =?US-ASCII?Q?____________________________________________________________?=
+ =?ISO-2022-JP?B?ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBskQlJfGyhC?="
+"Subject: \e$B0$\e(B                                                                                                                          \e$BR_\e(B")
+
+(encode
+"Subject: \e$B0$\e(B                                                                                                                          \e$BR_\e(B"
+"Subject: =?ISO-2022-JP?B?GyQpQrCkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDS3w=="
+'ignore-76bytes-limit 'ignore-75bytes-limit)
+
+(decode
+"Subject:=?ISO-2022-JP?B?GyRCJCIbKEI=?="
+"Subject:=?ISO-2022-JP?B?GyRCJCIbKEI=?=")
+
+(decode
+"Subject:=?ISO-2022-JP?B?GyRCJCIbKEI=?="
+"Subject:\e$B$"\e(B"
+'permit-sticked-special)
+
+(encode
+"From: \e.A\eN! <akr@jaist.ac.jp>"\e*B
+"From: =?ISO-8859-1?Q?=A1?= <akr@jaist.ac.jp>")
+
+(encode
+"From: \"abcdefghijklmnopqrstu\e.A\eN!()\\\"\\\\\" <akr@jaist.ac.jp>"\e*B
+"From: =?ISO-8859-1?Q?abcdefghijklmnopqrst=A1=28=29=22=5C?= <akr@jaist.ac.jp>")
+
+(encode
+"From: akr@jaist.ac.jp (abcdefghijklmnopqrst\e.A\eN!\\(\\)\"\\\\)"\e*B
+"From: akr@jaist.ac.jp (=?ISO-8859-1?Q?abcdefghijklmnopqrst=A1=28=29\"=5C?=)")
+
 ;----------------------------------------------------------------------------