From: akr Date: Mon, 24 May 1999 15:06:19 +0000 (+0000) Subject: * TESTPAT-DOODLE: New file. X-Git-Tag: doodle-1_12_6~6 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=063549a57b5346a8cafa6647da7034c0430aef06;p=elisp%2Fflim.git * TESTPAT-DOODLE: New file. * TESTPAT-FLIM: New file. * TESTPAT: Re-constructed. * Makefile (check): Use TESTPAT-DOODLE. (check-verbose): New target. --- diff --git a/ChangeLog b/ChangeLog index 8f83972..a3aa30d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1999-05-24 Tanaka Akira + + * TESTPAT-DOODLE: New file. + + * TESTPAT-FLIM: New file. + + * TESTPAT: Re-constructed. + + * Makefile (check): Use TESTPAT-DOODLE. + (check-verbose): New target. + 1999-03-27 Tanaka Akira * mime-def.el (mime-library-product): Bump up to FLAM-DOODLE diff --git a/Makefile b/Makefile index 84d75f6..94648d4 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,10 @@ ew-parse.el: ew-parse.scm lalr-el.scm -scm -f lalr-el.scm -f ew-parse.scm > ew-parse.out check: - $(EMACS) $(FLAGS_CURDIR) -l ./TESTPAT -eval '(report)' + $(EMACS) -batch -q -no-site-file -l TESTPAT -l TESTPAT-DOODLE -f report-doodle 2>&1 + +check-verbose: + $(EMACS) -batch -q -no-site-file -l TESTPAT -l TESTPAT-DOODLE -f report-doodle-verbose 2>&1 # The file BENCHMARK is not a part of FLAM-DOODLE because it is so large. benchmark: diff --git a/TESTPAT b/TESTPAT index eb4f444..1e91486 100644 --- a/TESTPAT +++ b/TESTPAT @@ -17,120 +17,7 @@ ;;encode-long-ascii-string-for-fold ; violate the policy preserving US-ASCII string ;;divide-atom-for-fold ; violate tne policy preserving absence of space -;;; test driver - -(defvar target 'doodle) -(cond - ((eq target 'flim) ; FLIM or FLAM - (require 'mime) - (require 'ew-line) - - (if (< max-specpdl-size 1000) - (setq max-specpdl-size 1000)) - - (defun decode-test (src dsts &rest opts) - (setq src (ew-crlf-to-lf src)) - (setq eword-lexical-analyze-cache nil) - (setq eword-decode-sticked-encoded-word - (or (memq 'permit-sticked-comment opts) - (memq 'permit-sticked-special opts))) - (setq eword-decode-quoted-encoded-word nil) - (with-temp-buffer - (insert src "\n" mail-header-separator) - (eword-decode-header 'us-ascii mail-header-separator) - (goto-char (point-min)) - (std11-narrow-to-header mail-header-separator) - (std11-field-end) - (let ((result (ew-lf-to-crlf - (std11-unfold-string - (buffer-substring-no-properties (point-min) (point)))))) - (if (member result dsts) t result)))) - - (defun encode-test (src dsts &rest opts) - (setq eword-lexical-analyze-cache nil) - (setq eword-decode-sticked-encoded-word nil) - (setq eword-decode-quoted-encoded-word nil) - (with-temp-buffer - (insert src "\n" mail-header-separator) - (goto-char (point-min)) - (eword-encode-header 'us-ascii) - (goto-char (point-min)) - (std11-narrow-to-header mail-header-separator) - (std11-field-end) - (let ((result (ew-lf-to-crlf (buffer-substring-no-properties (point-min) (point))))) - (if (member result dsts) t result))))) - - ((eq target 'doodle) ; DOODLE - (require 'ew-dec) - (require 'ew-line) - - (defun decode-test (src dsts &rest opts) - (setq ew-decode-field-cache-buf nil) - (let ((ew-decode-sticked-encoded-word nil) - (ew-decode-quoted-encoded-word nil) - (ew-ignore-75bytes-limit (memq 'ignore-75bytes-limit opts)) - (ew-ignore-76bytes-limit (memq 'ignore-76bytes-limit opts)) - (ew-permit-sticked-comment (memq 'permit-sticked-comment opts)) - (ew-permit-sticked-special (memq 'permit-sticked-special opts)) - (ew-permit-null-encoded-text nil)) - (string-match "\\`[^:]*:" src) - (let* ((field-name (substring src - (match-beginning 0) - (1- (match-end 0)))) - (field-body (substring src (match-end 0))) - (result (ew-crlf-unfold - (concat field-name ":" - (ew-decode-field field-name field-body))))) - (if (member result dsts) t result)))) - - (defun encode-test (src dsts &rest opts) - nil) - ) -) - -;;; - -(setq decode-succ-count 0) -(setq decode-all-count 0) -(defun decode (src dsts &rest opts) - (if (stringp dsts) (setq dsts (list dsts))) - (setq decode-all-count (1+ decode-all-count)) - (let ((res (condition-case nil - (apply 'decode-test src dsts opts) - (error nil)))) - (if (eq res t) - (progn - (setq decode-succ-count (1+ decode-succ-count)) - (insert "\n'dsucc")) - (insert (format "\n%S\n'dfail" res))) - res)) - -(setq encode-succ-count 0) -(setq encode-all-count 0) -(defun encode (src dsts &rest opts) - (if (stringp dsts) (setq dsts (list dsts))) - (setq encode-all-count (1+ encode-all-count)) - (let ((res (condition-case nil - (apply 'encode-test src dsts opts) - (error nil)))) - (if (eq res t) - (progn - (setq encode-succ-count (1+ encode-succ-count)) - (insert "\n'esucc")) - (insert (format "\n%S\n'efail" res))) - res)) - -(defun report () - (let ((report (format "Decode: %d/%d Encode: %d/%d Total: %d/%d" - decode-succ-count decode-all-count - encode-succ-count encode-all-count - (+ decode-succ-count encode-succ-count) - (+ decode-all-count encode-all-count)))) - (if noninteractive - (princ (concat report "\n")) - (insert "\n\"" report "\"")))) - -;;;start-test +(defconst test-patterns '( ;;; Section 1: Decoding examples from RFC2047 @@ -338,7 +225,7 @@ (decode "From: =?US-ASCII?Q?=28?= , =?US-ASCII?Q?=29?= " "From: \"(\" , \")\" " -'ignore-76bytes-limit) +ignore-76bytes-limit) (decode "From: =?ISO-2022-JP?B?YSJiGyRCJCIbKEJjXA==?= " @@ -526,7 +413,7 @@ (decode "=?ISO-2022-JP?B?GyRCJCIbKEI=?=: test" "=?ISO-2022-JP?B?GyRCJCIbKEI=?=: test" -'permit-sticked-special) +permit-sticked-special) ;;; Section 3: Decoding melancholic inputs. @@ -554,17 +441,17 @@ (decode "From: (a)=?ISO-2022-JP?B?GyRCJCIbKEI=?= " "From: (a)$B$"(B " -'permit-sticked-comment) +permit-sticked-comment) (decode "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(b) " "From: $B$"(B(b) " -'permit-sticked-comment) +permit-sticked-comment) (decode "From: (a)=?ISO-2022-JP?B?GyRCJCIbKEI=?=(b) " "From: (a)$B$"(B(b) " -'permit-sticked-comment) +permit-sticked-comment) (decode "From: \"a\"=?ISO-2022-JP?B?GyRCJCIbKEI=?= " @@ -582,7 +469,7 @@ "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r " "From: $B$"(B($B$"(B) " -'permit-sticked-comment) +permit-sticked-comment) (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=" @@ -591,7 +478,7 @@ (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=" "To: $B$"(B" -'permit-sticked-special) +permit-sticked-special) (decode "To: ,=?ISO-2022-JP?B?GyRCJCIbKEI=?=" @@ -600,7 +487,7 @@ (decode "To: ,=?ISO-2022-JP?B?GyRCJCIbKEI=?=" "To: ,$B$"(B" -'permit-sticked-special) +permit-sticked-special) (decode "To: akr@jaist.ac.jp,=?ISO-2022-JP?B?GyRCJCIbKEI=?=" @@ -609,7 +496,7 @@ (decode "To: akr@jaist.ac.jp,=?ISO-2022-JP?B?GyRCJCIbKEI=?=" "To: akr@jaist.ac.jp,$B$"(B" -'permit-sticked-special) +permit-sticked-special) (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:akr@jaist.ac.jp;" @@ -618,7 +505,7 @@ (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:akr@jaist.ac.jp;" "To: $B$"(B:akr@jaist.ac.jp;" -'permit-sticked-special) +permit-sticked-special) (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=;" @@ -627,7 +514,7 @@ (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=;" "To: $B$"(B:$B$$(B;" -'ignore-76bytes-limit 'permit-sticked-special) +ignore-76bytes-limit permit-sticked-special) (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=,=?ISO-2022-JP?B?GyRCJCYbKEI=?=;,=?ISO-2022-JP?B?GyRCJCgbKEI=?=" @@ -636,7 +523,7 @@ (decode "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=,=?ISO-2022-JP?B?GyRCJCYbKEI=?=;,=?ISO-2022-JP?B?GyRCJCgbKEI=?=" "To: $B$"(B:$B$$(B,$B$&(B;,$B$((B" -'ignore-76bytes-limit 'permit-sticked-special) +ignore-76bytes-limit permit-sticked-special) (decode "Subject:=?ISO-2022-JP?B?GyRCJCIbKEI=?=" @@ -663,7 +550,7 @@ "From: akr@jaist.ac.jp\r (=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)" "From: akr@jaist.ac.jp ($B$"(B($B$$(B)$B$&(B)" -'ignore-76bytes-limit) +ignore-76bytes-limit) (decode "Subject: =?=?ISO-2022-JP?B?GyRCJCIbKEI=?=" @@ -756,7 +643,7 @@ (encode "Subject: $B0$(B $BR_(B" "Subject: =?ISO-2022-JP?B?GyQpQrCkICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDS3w==" -'ignore-76bytes-limit 'ignore-75bytes-limit) +ignore-76bytes-limit ignore-75bytes-limit) (encode "From: .AN! "*B @@ -772,25 +659,25 @@ (encode "Subject: $B$"(B a .HN`"*B -'("Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= a =?ISO-8859-8?Q?=E0?=" - "Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= a =?ISO-8859-8?B?4A==?=")) +("Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= a =?ISO-8859-8?Q?=E0?=" + "Subject: =?ISO-2022-JP?B?GyRCJCIbKEI=?= a =?ISO-8859-8?B?4A==?=")) (encode "Subject: .HN`$BNm(B"*B -'("Subject: =?ISO-8859-8?Q?=E0?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=" - "Subject: =?ISO-8859-8?B?4A==?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=")) +("Subject: =?ISO-8859-8?Q?=E0?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=" + "Subject: =?ISO-8859-8?B?4A==?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=")) (encode "Subject: .HN` $BNm(B"*B -'("Subject: =?ISO-8859-8?Q?=E0_?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=" - "Subject: =?ISO-8859-8?Q?=E0?= =?ISO-2022-JP?B?IBskQk5tGyhC?=" - "Subject: =?ISO-8859-8?B?4CA=?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=" - "Subject: =?ISO-8859-8?B?4A==?= =?ISO-2022-JP?B?IBskQk5tGyhC?=")) +("Subject: =?ISO-8859-8?Q?=E0_?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=" + "Subject: =?ISO-8859-8?Q?=E0?= =?ISO-2022-JP?B?IBskQk5tGyhC?=" + "Subject: =?ISO-8859-8?B?4CA=?= =?ISO-2022-JP?B?GyRCTm0bKEI=?=" + "Subject: =?ISO-8859-8?B?4A==?= =?ISO-2022-JP?B?IBskQk5tGyhC?=")) (encode "Subject: .FNC$B4X?t(B"*B -'("Subject: =?ISO-8859-7?Q?=C3?= =?ISO-2022-JP?B?GyRCNFg/dBsoQg==?=" - "Subject: =?ISO-2022-JP-2?B?Gy5GG05DGyRCNFg/dBsoQg==?=")) +("Subject: =?ISO-8859-7?Q?=C3?= =?ISO-2022-JP?B?GyRCNFg/dBsoQg==?=" + "Subject: =?ISO-2022-JP-2?B?Gy5GG05DGyRCNFg/dBsoQg==?=")) (encode "From: aaaaaaaaaaaaaaaaaaaaa($B$"$$(B)aaaaaaaaaaaaaaaaaaaa " @@ -799,23 +686,23 @@ (encode "From: aaaaaaaaaaaaaaaaaaaaa ($B$"$$(B)aaaaaaaaaaaaaaaaaaaa " -'("From: aaaaaaaaaaaaaaaaaaaaa +("From: aaaaaaaaaaaaaaaaaaaaa (=?ISO-2022-JP?B?GyRCJCIkJBsoQg==?=)aaaaaaaaaaaaaaaaaaaa " - "From: aaaaaaaaaaaaaaaaaaaaa (=?ISO-2022-JP?B?GyRCJCIbKEI=?= + "From: aaaaaaaaaaaaaaaaaaaaa (=?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?=)aaaaaaaaaaaaaaaaaaaa ")) (encode "From: aaaaaaaaaaaaaaaaaaaaa( $B$"$$(B)aaaaaaaaaaaaaaaaaaaa " -'("From: aaaaaaaaaaaaaaaaaaaaa( +("From: aaaaaaaaaaaaaaaaaaaaa( =?ISO-2022-JP?B?GyRCJCIkJBsoQg==?=)aaaaaaaaaaaaaaaaaaaa " - "From: aaaaaaaaaaaaaaaaaaaaa( =?ISO-2022-JP?B?GyRCJCIbKEI=?= + "From: aaaaaaaaaaaaaaaaaaaaa( =?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?=)aaaaaaaaaaaaaaaaaaaa ")) (encode "From: aaaaaaaaaaaaaaaaaaaaa($B$"$$(B )aaaaaaaaaaaaaaaaaaaa " -'("From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIkJBsoQg==?= +("From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIkJBsoQg==?= )aaaaaaaaaaaaaaaaaaaa " - "From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIbKEI=?= + "From: aaaaaaaaaaaaaaaaaaaaa(=?ISO-2022-JP?B?GyRCJCIbKEI=?= =?ISO-2022-JP?B?GyRCJCQbKEI=?= )aaaaaaaaaaaaaaaaaaaa ")) (encode @@ -859,51 +746,51 @@ "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ($B$"(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ($B$"(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'separate-sticked-tokens-for-fold) +separate-sticked-tokens-for-fold) (encode "From: ($B$"(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)=?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaa?=\r =?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?= " -'encode-long-ascii-string-for-fold 'permit-sticked-special) +encode-long-ascii-string-for-fold permit-sticked-special) (encode "From: ($B$"(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r aaaaaaaaaaaaaaaa " -'divide-atom-for-fold) +divide-atom-for-fold) (encode "From: ($B$"(B)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'("From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " - "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +("From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " + "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ") -'ignore-76bytes-limit) +ignore-76bytes-limit) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa($B$"(B)aa " "From: =?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?=\r =?US-ASCII?Q?a?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aa " -'encode-long-ascii-string-for-fold) +encode-long-ascii-string-for-fold) (encode "From: $B$"(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa($B$"(B)aa " "From: =?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==?=\r =?US-ASCII?Q?aaaaaaaaaaaaaaa?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)aa" -'encode-long-ascii-string-for-fold) +encode-long-ascii-string-for-fold) (encode "From: ($B$"(B) " @@ -914,21 +801,21 @@ "From: ((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ((((((((((((((((((((((((((((((((((((((((($B$"(B))))))))))))))))))))))))))))))))))))))))) " "From: (((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r =?ISO-2022-JP?B?GyRCJCIbKEI=?=)))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: (((((((((((((((((((((((((((((((((((((((((((((($B$"(B)))))))))))))))))))))))))))))))))))))))))))))) " "From: ((((((((((((((((((((((((((((((((((((((((((((((=?ISO-2022-JP?B?GyhC?=\r =?ISO-2022-JP?B?GyRCJCIbKEI=?=))))))))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ((((((((((((((((((((((((((((((((((((((((((((((($B$"(B))))))))))))))))))))))))))))))))))))))))))))))) " @@ -936,7 +823,7 @@ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=)))))))))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: (((((((((((((((((((((((((((((((((((((((((((((((($B$"(B)))))))))))))))))))))))))))))))))))))))))))))))) " @@ -945,7 +832,7 @@ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: (((((((((((((((((((((((((((((((((((((((((((((((((((((($B$"(B)))))))))))))))))))))))))))))))))))))))))))))))))))))) " @@ -954,7 +841,7 @@ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ((((((((((((((((((((((((((((((((((((((((((($B$"(B))))))))))))))))))))))))))))))))))))))))))) " @@ -963,7 +850,7 @@ =?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ((((((((((((((((((((((((((((((((((((((((((((((((((((((($B$"(B))))))))))))))))))))))))))))))))))))))))))))))))))))))) " @@ -972,7 +859,7 @@ =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)=?ISO-2022-JP?B?GyhC?=\r =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: (((((((((((((((((((((((((((((((((((((((((((((((((((((((($B$"(B)))))))))))))))))))))))))))))))))))))))))))))))))))))))) " @@ -982,7 +869,7 @@ =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))))))))))=?ISO-2022-JP?B?GyhC?=\r =?ISO-2022-JP?B?GyhC?=))))))))))))))))))))))))\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ()($B$"(B)() " @@ -1004,14 +891,14 @@ "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()()()()()()()()()()()()()()\r " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: ($B$"(B)()()()()()()()()()()()()()()()()()()()()()()()()()()() " "From: (=?ISO-2022-JP?B?GyRCJCIbKEI=?=\r =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()()()()()()(=?ISO-2022-JP?B?GyhC?=\r =?ISO-2022-JP?B?GyhC?=)()()()()()()()()()()() " -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "To: l@d ($B$"(B aaa)($B$"(B)" @@ -1031,13 +918,13 @@ "To: l@d ($B$"(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)($B$"(B)" "To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=?=\r =?US-ASCII?Q?aaaaaaaaaaaaaaaaaa?=)(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)" -'encode-long-ascii-string-for-fold) +encode-long-ascii-string-for-fold) (encode "To: l@d ($B$"(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()$B$"(B)" "To: l@d (=?ISO-2022-JP?B?GyRCJCIbKEIgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWE=?=\r =?US-ASCII?Q?aaaaaaaaaaaaaaaaaa?=()=?ISO-2022-JP?B?GyRCJCIbKEI=?=)" -'encode-long-ascii-string-for-fold) +encode-long-ascii-string-for-fold) (encode "To: l@d ($B$"(B aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa $B$"(B)($B$"(B)" @@ -1077,167 +964,167 @@ "From: akr@jaist.ac.jp ($B$"(B($B$$(B)$B$&(B)" "From: akr@jaist.ac.jp\r (=?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)" -'ignore-76bytes-limit) +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=?=\r =?ISO-2022-JP?B?GyhC?=(=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r =?ISO-2022-JP?B?GyhC?=)=?ISO-2022-JP?B?GyRCJCYbKEI=?=)" -'zero-characters-encoded-word-hack) +zero-characters-encoded-word-hack) (encode "From: $B$"(B($B$"(B) " "From: =?ISO-2022-JP?B?GyRCJCIbKEIoGyRCJCIbKEIp?= " -'encode-sticked-comment-as-atom) +encode-sticked-comment-as-atom) (encode "From: $B$"(B($B$"(B) " "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?=(=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: $B$"(B($B$"(B) " "From: =?ISO-2022-JP?B?GyRCJCIbKEI=?= (=?ISO-2022-JP?B?GyRCJCIbKEI=?=)\r " -'separate-sticked-comment) +separate-sticked-comment) (encode "To: $B$"(B" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=" -'permit-sticked-special) +permit-sticked-special) (encode "To: $B$"(B" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= " -'separate-sticked-special) +separate-sticked-special) (encode "To: ,$B$"(B" "To: ,=?ISO-2022-JP?B?GyRCJCIbKEI=?=" -'permit-sticked-special) +permit-sticked-special) (encode "To: ,$B$"(B" "To: , =?ISO-2022-JP?B?GyRCJCIbKEI=?= " -'separate-sticked-special) +separate-sticked-special) (encode "To: akr@jaist.ac.jp,$B$"(B" "To: akr@jaist.ac.jp,=?ISO-2022-JP?B?GyRCJCIbKEI=?=" -'permit-sticked-special) +permit-sticked-special) (encode "To: akr@jaist.ac.jp,$B$"(B" "To: akr@jaist.ac.jp, =?ISO-2022-JP?B?GyRCJCIbKEI=?= " -'separate-sticked-special) +separate-sticked-special) (encode "To: $B$"(B:akr@jaist.ac.jp;" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:akr@jaist.ac.jp;" -'permit-sticked-special) +permit-sticked-special) (encode "To: $B$"(B:akr@jaist.ac.jp;" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= :akr@jaist.ac.jp;" -'separate-sticked-special) +separate-sticked-special) (encode "To: $B$"(B:$B$$(B;" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=;" -'ignore-76bytes-limit 'permit-sticked-special) +ignore-76bytes-limit permit-sticked-special) (encode "To: $B$"(B:$B$$(B;" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r =?ISO-2022-JP?B?GyhC?=;" -'zero-characters-encoded-word-hack 'permit-sticked-special) +zero-characters-encoded-word-hack permit-sticked-special) (encode "To: $B$"(B:$B$$(B;" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= : =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r ;" -'separate-sticked-special) +separate-sticked-special) (encode "To: $B$"(B:$B$$(B,$B$&(B;,$B$((B" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=,=?ISO-2022-JP?B?GyRCJCYbKEI=?=;,=?ISO-2022-JP?B?GyRCJCgbKEI=?=" -'ignore-76bytes-limit 'permit-sticked-special) +ignore-76bytes-limit permit-sticked-special) (encode "To: $B$"(B:$B$$(B,$B$&(B;,$B$((B" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?=:=?ISO-2022-JP?B?GyRCJCQbKEI=?=\r =?ISO-2022-JP?B?GyhC?=,=?ISO-2022-JP?B?GyRCJCYbKEI=?=\r =?ISO-2022-JP?B?GyhC?=;,=?ISO-2022-JP?B?GyRCJCgbKEI=?=" -'zero-characters-encoded-word-hack 'permit-sticked-special) +zero-characters-encoded-word-hack permit-sticked-special) (encode "To: $B$"(B:$B$$(B,$B$&(B;,$B$((B" "To: =?ISO-2022-JP?B?GyRCJCIbKEI=?= : =?ISO-2022-JP?B?GyRCJCQbKEI=?=\r , =?ISO-2022-JP?B?GyRCJCYbKEI=?= ;,\r =?ISO-2022-JP?B?GyRCJCgbKEI=?= " -'separate-sticked-special) +separate-sticked-special) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6ShPw==?=()aaaaa\r " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaa " -'("From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r +("From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()aaaaa " - "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r + "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaa ") -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?= =?US-ASCII?Q?=3F?=()aaaaa " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'("From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r +("From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " - "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r + "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ") -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " @@ -1245,7 +1132,7 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " @@ -1253,38 +1140,38 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r " -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " -'("From:\r +("From:\r aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?EUC-KR?B?P6Sh?=\r =?US-ASCII?Q?=3F?=()=?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?=\r =?US-ASCII?Q?aaaaaaaaaaaaaaaa?= " - "From: =?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?= + "From: =?US-ASCII?Q?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?= =?US-ASCII?Q?aa?=()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r ") -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -'permit-sticked-comment) +permit-sticked-comment) (encode "From:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "From:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -'permit-sticked-comment) +permit-sticked-comment) (encode "From: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()?$(C$!(B?()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" "From:\r aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()=?US-ASCII?Q?=3F?=\r =?EUC-KR?B?pKE/?=()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -'permit-sticked-comment) +permit-sticked-comment) ;---------------------------------------------------------------------------- @@ -1385,95 +1272,95 @@ (decode "Subject: =?Unknown-Charset?B?gqA=?=" "Subject: =?+Unknown-Charset?B?gqA=?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?US-ASCII?G?H4sIACqUszUAA8tIzcnJBwCGphA2BQAAAA==?=" "Subject: =?+US-ASCII?G?H4sIACqUszUAA8tIzcnJBwCGphA2BQAAAA==?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?US-ASCII?Unknown-Encoding?H4sIAGOUszUAAwtyczYyMDEHAEpvqpIHAAAA?=" "Subject: =?+US-ASCII?Unknown-Encoding?H4sIAGOUszUAAwtyczYyMDEHAEpvqpIHAAAA?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?ISO-2022-JP?G?H4sIAGiTszUAA5NWcVIBAhMtaQ0nAGLSaeEMAAAA?=\r =?ISO-2022-JP?G?H4sIAH6TszUAA5NWcVIxV3FTyVbxldZwAgAuIikKDgAAAA==?=" "Subject: =?+ISO-2022-JP?G?H4sIAGiTszUAA5NWcVIBAhMtaQ0nAGLSaeEMAAAA?==?+ISO-2022-JP?G?H4sIAH6TszUAA5NWcVIxV3FTyVbxldZwAgAuIikKDgAAAA==?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?Unknown-Charset?B?gqA=?= =?Unknown-Charset?B?gqA=?=" "Subject: =?+Unknown-Charset?B?gqA=?==?+Unknown-Charset?B?gqA=?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?Unknown-Charset?B?gqA=?= =?Unknown-Charset?B?gqA=?=" "Subject: =?+Unknown-Charset?B?gqA=?==?+Unknown-Charset?B?gqA=?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?Unknown-Charset?B?gqA=?=\r =?Unknown-Charset?B?gqA=?=" "Subject: =?+Unknown-Charset?B?gqA=?==?+Unknown-Charset?B?gqA=?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?Unknown-Charset?B?gqA=?=\r \t=?Unknown-Charset?B?gqA=?=" "Subject: =?+Unknown-Charset?B?gqA=?==?+Unknown-Charset?B?gqA=?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: a=?Unknown-Charset?B?gqA=?=" "Subject: a=?Unknown-Charset?B?gqA=?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?Unknown-Charset?B?gqA=?=b" "Subject: =?Unknown-Charset?B?gqA=?=b" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: a=?Unknown-Charset?B?gqA=?=b" "Subject: a=?Unknown-Charset?B?gqA=?=b" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: a =?Unknown-Charset?B?gqA=?= b" "Subject: a =?+Unknown-Charset?B?gqA=?= b" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?ISO-2022-JP?B?DQoNCg==?=" "Subject: =?+US-ASCII?Q?=0D=0A=0D=0A?=" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?US-ASCII?Q?a=0D=0A_b?=" "Subject: a b" -'embedded-encoded-word) +embedded-encoded-word) (decode "Subject: =?US-ASCII?Q?a=0D=0Ab?=" "Subject: a=?+US-ASCII?Q?=0D=0A?=b" -'embedded-encoded-word) +embedded-encoded-word) (decode "From: =?+C?Q?abcdef?= " "From: =?++++C?Q?abcdef?= " -'embedded-encoded-word) +embedded-encoded-word) (decode "From: \"=?+C?Q?abcdef?=\" " "From: \"=?+++C?Q?abcdef?=\" " -'embedded-encoded-word) +embedded-encoded-word) (decode "From: =?C?Q?abc?= =?US-ASCII?Q?=2E?= " "From: \"=?+C?Q?abc?=.\" " -'embedded-encoded-word) +embedded-encoded-word) ;;; Section 8: CR and LF. @@ -1508,12 +1395,12 @@ (decode "From: akr@jaist.ac.jp (\\\r=?US-ASCII?Q?=0A?= =?US-ASCII?Q?a?=)" "From: akr@jaist.ac.jp (=?+US-ASCII?Q?=0D=0A?=a)" -'embedded-encoded-word) +embedded-encoded-word) (decode "From: akr@jaist.ac.jp (\\\r=?US-ASCII?Q?=0Aa?=)" "From: akr@jaist.ac.jp (=?+US-ASCII?Q?=0D=0A?=a)" -'embedded-encoded-word) +embedded-encoded-word) (decode "From: akr@jaist.ac.jp (\\\r=?US-ASCII?Q?=0A_?=)" @@ -1535,17 +1422,89 @@ "From: akr@jaist.ac.jp (\\\r=?US-ASCII?Q?=0A?=\r =?US-ASCII?Q?=0D=0A?= =?US-ASCII?Q?a?=)" "From: akr@jaist.ac.jp (=?+US-ASCII?Q?=0D=0A=0D=0A?=a)" -'embedded-encoded-word) +embedded-encoded-word) (decode "From: akr@jaist.ac.jp (\\\r=?US-ASCII?Q?=0A?=\r =?US-ASCII?Q?=0D?=\\\n =?US-ASCII?Q?a?=)" "From: akr@jaist.ac.jp (=?+US-ASCII?Q?=0D=0A?=\r\\ a)" -'embedded-encoded-word) +embedded-encoded-word) -;;;end-test - -(report) +)) ;---------------------------------------------------------------------------- + +;;; test driver. + +(defun report (decoder encoder &optional verbose) + (let ((pats test-patterns) pat src dsts opts dst + (decode-success 0) + (decode-failure 0) + (decode-error 0) + (decode-giveup 0) + (encode-success 0) + (encode-failure 0) + (encode-error 0) + (encode-giveup 0)) + (while pats + (setq pat (car pats) + src (nth 1 pat) + dsts (nth 2 pat) + opts (nthcdr 3 pat) + pats (cdr pats)) + (if (stringp dsts) (setq dsts (list dsts))) + (cond + ((eq (car pat) 'decode) + (condition-case err + (progn + (setq dst (apply decoder src opts)) + (if dst + (if (member dst dsts) + (progn + (if verbose (message "decode-success: %S" pat)) + (setq decode-success (1+ decode-success))) + (progn + (if verbose (message "decode-failure: %S" pat)) + (setq decode-failure (1+ decode-failure)))) + (progn + (if verbose (message "decode-giveup: %S" pat)) + (setq decode-giveup (1+ decode-giveup))))) + (error + (if verbose (message "decode-error: %S %S" err pat)) + (setq decode-error (1+ decode-error))))) + ((eq (car pat) 'encode) + (condition-case err + (progn + (setq dst (apply encoder src opts)) + (if dst + (if (member dst dsts) + (progn + (if verbose (message "encode-success: %S" pat)) + (setq encode-success (1+ encode-success))) + (progn + (if verbose (message "encode-failure: %S" pat)) + (setq encode-failure (1+ encode-failure)))) + (progn + (if verbose (message "encode-giveup: %S" pat)) + (setq encode-giveup (1+ encode-giveup))))) + (error + (if verbose (message "encode-error: %S %S" err pat)) + (setq encode-error (1+ encode-error))))) + (t + (message "pattern error: %S" pat)))) + (message "\ +decode %d patterns: + success: %d + failure: %d + error: %d + giveup: %d +encode %d patterns: + success: %d + failure: %d + error: %d + giveup: %d" + (+ decode-success decode-failure decode-error decode-giveup) + decode-success decode-failure decode-error decode-giveup + (+ encode-success encode-failure encode-error encode-giveup) + encode-success encode-failure encode-error encode-giveup))) diff --git a/TESTPAT-DOODLE b/TESTPAT-DOODLE new file mode 100644 index 0000000..80d752d --- /dev/null +++ b/TESTPAT-DOODLE @@ -0,0 +1,31 @@ +(setq load-path (cons "." load-path)) +(require 'ew-dec) +(require 'ew-line) + +(defun decode-doodle (src &rest opts) + (setq ew-decode-field-cache-buf nil) + (let ((ew-decode-sticked-encoded-word nil) + (ew-decode-quoted-encoded-word nil) + (ew-ignore-75bytes-limit (memq 'ignore-75bytes-limit opts)) + (ew-ignore-76bytes-limit (memq 'ignore-76bytes-limit opts)) + (ew-permit-sticked-comment (memq 'permit-sticked-comment opts)) + (ew-permit-sticked-special (memq 'permit-sticked-special opts)) + (ew-permit-null-encoded-text nil)) + (string-match "\\`[^:]*:" src) + (let* ((field-name (substring src + (match-beginning 0) + (1- (match-end 0)))) + (field-body (substring src (match-end 0))) + (result (ew-crlf-unfold + (concat field-name ":" + (ew-decode-field field-name field-body))))) + result))) + +(defun encode-doodle (src &rest opts) + nil) + +(defun report-doodle () + (report 'decode-doodle 'encode-doodle)) + +(defun report-doodle-verbose () + (report 'decode-doodle 'encode-doodle t)) diff --git a/TESTPAT-FLIM b/TESTPAT-FLIM new file mode 100644 index 0000000..4526fb0 --- /dev/null +++ b/TESTPAT-FLIM @@ -0,0 +1,44 @@ +(setq load-path (cons "." load-path)) +(require 'mime) + +(if (< max-specpdl-size 1000) + (setq max-specpdl-size 1000)) + +(defun crlf-to-lf (str) (decode-coding-string str 'raw-text-dos)) +(defun lf-to-crlf (str) (encode-coding-string str 'raw-text-dos)) + +(defun decode-flim (src &rest opts) + (unless (memq 'embedded-encoded-word opts) + (setq src (crlf-to-lf src)) + (setq eword-lexical-analyze-cache nil) + (setq eword-decode-sticked-encoded-word + (or (memq 'permit-sticked-comment opts) + (memq 'permit-sticked-special opts))) + (setq eword-decode-quoted-encoded-word nil) + (with-temp-buffer + (insert src "\n" mail-header-separator) + (eword-decode-header 'us-ascii mail-header-separator) + (goto-char (point-min)) + (std11-narrow-to-header mail-header-separator) + (std11-field-end) + (std11-unfold-string (buffer-substring (point-min) (point)))))) + +(defun encode-flim (src &rest opts) + (setq src (crlf-to-lf src)) + (setq eword-lexical-analyze-cache nil) + (setq eword-decode-sticked-encoded-word nil) + (setq eword-decode-quoted-encoded-word nil) + (with-temp-buffer + (insert src "\n" mail-header-separator) + (goto-char (point-min)) + (eword-encode-header 'us-ascii) + (goto-char (point-min)) + (std11-narrow-to-header mail-header-separator) + (std11-field-end) + (lf-to-crlf (buffer-substring (point-min) (point))))) + +(defun report-flim () + (report 'decode-flim 'encode-flim)) + +(defun report-flim-verbose () + (report 'decode-flim 'encode-flim t))