From af117c9cf267b0c792ac9dbc7b6589af5951cdde Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 18 Jul 1998 06:04:43 +0000 Subject: [PATCH] * (TESTPAT): add test driver for FLIM-FLAM. --- ChangeLog | 16 +++-- TESTPAT | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 219 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index a25946f..d060c7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1998-07-18 Tanaka Akira + + * (TESTPAT): add test driver for FLIM-FLAM. + 1998-07-16 Tanaka Akira * (TESTPAT): change format to s-exp. @@ -170,7 +174,7 @@ 1998-07-01 MORIOKA Tomohiko - * FLIM: Version 1.8.0 (-DÒkubo)-A was released. + * FLIM: Version 1.8.0 (.DNRkubo) was released.*B * README.en: Delete `How to use'. @@ -295,7 +299,7 @@ 1998-06-28 MORIOKA Tomohiko - * FLIM-Chao: Version 1.7.0 (Goj-Dò)-A was released. + * FLIM-Chao: Version 1.7.0 (Goj.DNr) was released.*B 1998-06-26 MORIOKA Tomohiko @@ -554,7 +558,7 @@ 1998-06-19 MORIOKA Tomohiko - * FLIM: Version 1.4.1 (Momoyama-Gory-Dòmae)-A was released. + * FLIM: Version 1.4.1 (Momoyama-Gory.DNrmae) was released.*B 1998-06-18 MORIOKA Tomohiko @@ -674,7 +678,7 @@ 1998-05-06 MORIOKA Tomohiko - * FLIM: Version 1.2.0 (J-Dþêò©-A was released. + * FLIM: Version 1.2.0 (J.DN~NjNrN) was released.*B * README.en (What's FLIM): Delete description about std11-parse.el; add description about mailcap.el. @@ -725,7 +729,7 @@ 1998-05-05 MORIOKA Tomohiko - * FLIM: Version 1.1.0 (T-Dòêi)-A was released. + * FLIM: Version 1.1.0 (T.DNrNji) was released.*B 1998-05-04 MORIOKA Tomohiko @@ -761,7 +765,7 @@ 1998-04-17 MORIOKA Tomohiko - * FLIM: Version 1.0.1 (Ky-Dòôo)-A was released. + * FLIM: Version 1.0.1 (Ky.DNrNto) was released.*B * mime-def.el (mime-spadework-module-version-string): New constant. diff --git a/TESTPAT b/TESTPAT index 69a4053..7b7402c 100644 --- a/TESTPAT +++ b/TESTPAT @@ -1,10 +1,148 @@ ;---------------------------------------------------------------------------- ;-------- 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?= " +"From: Keith Moore ") + +(decode +"To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= " +"To: Keld J.ANxrn Simonsen ")*B + +(decode +"CC: =?ISO-8859-1?Q?Andr=E9?= Pirard " +"CC: Andr.ANi Pirard ")*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?= " +"From: Olle J.ANdrnefors ")*B + +(decode +"From: =?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?= " +"From: Patrik F.ANdltstrNvm ")*B + +(decode +"From: Nathaniel Borenstein + (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)" +"From: Nathaniel Borenstein (.HNmNeNlNy NoNa NiNlNhNtNp)")*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=?= " "From: $B$"(B ") +(encode +"From: $B$"(B " +"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= ") + (decode "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?= " @@ -35,8 +173,7 @@ (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 @@ -49,12 +186,25 @@ "From: akr@jaist.ac.jp ($B$"(B($B$$(B)$B$&(B)" 'ignore-76bytes-limit) +(encode +"From: akr@jaist.ac.jp ($B$"(B($B$$(B)$B$&(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 ($B$"(B($B$$(B)$B$&(B)") +(encode +"From: akr@jaist.ac.jp ($B$"(B($B$$(B)$B$&(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=?= " "From: a=?ISO-2022-JP?B?GyRCJCIbKEI=?= ") @@ -90,8 +240,8 @@ 'permit-sticked-comment) (decode -"From: (a)$B$"(B(b) " "From: (a)=?ISO-2022-JP?B?GyRCJCIbKEI=?=(b) " +"From: (a)$B$"(B(b) " 'permit-sticked-comment) (decode @@ -130,6 +280,10 @@ "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: \"$B$"(B($B$"(B)\" " +"From: =?ISO-2022-JP?B?GyRCJCIbKEIoGyRCJCIbKEIp?= ") + (decode "From: =?ISO-2022-JP?B?GyRCJCIbKEIoGyRCJCIbKEIp?= " "From: \"$B$"(B($B$"(B)\" ") @@ -152,6 +306,20 @@ 'separate-sticked-comment) (decode +"From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=) + " +"From: $B$"(B($B$"(B) " +'permit-sticked-comment) + +(decode +"From: =?ISO-2022-JP?B?YSJiGyRCJCIbKEJjXAo=?= " +"From: \"a\"b$B$"(Bc\\\" ") + +(encode +"From: "a\"b$B$"(B\\" " +"From: =?ISO-2022-JP?B?YSJiGyRCJCIbKEJjXAo=?= ") + +(decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=") @@ -337,4 +505,42 @@ "Subject: =?ISO-2022-JP?B?DQoNCg==?=" "Subject: ") +(encode +"Subject: $B0$(B $BR_(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: $B0$(B $BR_(B") + +(encode +"Subject: $B0$(B $BR_(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:$B$"(B" +'permit-sticked-special) + +(encode +"From: .AN! "*B +"From: =?ISO-8859-1?Q?=A1?= ") + +(encode +"From: \"abcdefghijklmnopqrstu.AN!()\\\"\\\\\" "*B +"From: =?ISO-8859-1?Q?abcdefghijklmnopqrst=A1=28=29=22=5C?= ") + +(encode +"From: akr@jaist.ac.jp (abcdefghijklmnopqrst.AN!\\(\\)\"\\\\)"*B +"From: akr@jaist.ac.jp (=?ISO-8859-1?Q?abcdefghijklmnopqrst=A1=28=29\"=5C?=)") + ;---------------------------------------------------------------------------- -- 1.7.10.4