diff options
| author | Glenn Morris | 2011-11-21 21:55:06 -0500 |
|---|---|---|
| committer | Glenn Morris | 2011-11-21 21:55:06 -0500 |
| commit | 394c65f1c1431645a7ff07afffaac3ce6ac9d55e (patch) | |
| tree | 55ae8c7ec8add53054bb48e8de58a43b76c2bf3f /lisp | |
| parent | a3e0ee5a69ae6b442494c3a62880db5168405b18 (diff) | |
| download | emacs-394c65f1c1431645a7ff07afffaac3ce6ac9d55e.tar.gz emacs-394c65f1c1431645a7ff07afffaac3ce6ac9d55e.zip | |
Move rmailmm test functions to test/ directory.
* lisp/mail/rmailmm.el (test-rmail-mime-handler)
(test-rmail-mime-bulk-handler)
(test-rmail-mime-multipart-handler): Move tests to test/ directory.
* test/rmailmm.el: New file, split from lisp/mail/rmailmm.el.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/mail/rmailmm.el | 69 |
2 files changed, 6 insertions, 69 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9293a66c394..37ecd3e6852 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-11-22 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mail/rmailmm.el (test-rmail-mime-handler) | ||
| 4 | (test-rmail-mime-bulk-handler) | ||
| 5 | (test-rmail-mime-multipart-handler): Move tests to test/ directory. | ||
| 6 | |||
| 1 | 2011-11-21 Juri Linkov <juri@jurta.org> | 7 | 2011-11-21 Juri Linkov <juri@jurta.org> |
| 2 | 8 | ||
| 3 | * calc/calc.el (calc-read-key-sequence): Let-bind `input-method-function' | 9 | * calc/calc.el (calc-read-key-sequence): Let-bind `input-method-function' |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 31e34cd098f..e53e0c0744e 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -612,23 +612,6 @@ HEADER is a header component of a MIME-entity object (see | |||
| 612 | (rmail-mime-insert-decoded-text entity))) | 612 | (rmail-mime-insert-decoded-text entity))) |
| 613 | (put-text-property beg (point) 'rmail-mime-entity entity))) | 613 | (put-text-property beg (point) 'rmail-mime-entity entity))) |
| 614 | 614 | ||
| 615 | ;; FIXME move to the test/ directory? | ||
| 616 | (defun test-rmail-mime-handler () | ||
| 617 | "Test of a mail using no MIME parts at all." | ||
| 618 | (let ((mail "To: alex@gnu.org | ||
| 619 | Content-Type: text/plain; charset=koi8-r | ||
| 620 | Content-Transfer-Encoding: 8bit | ||
| 621 | MIME-Version: 1.0 | ||
| 622 | |||
| 623 | \372\304\322\301\327\323\324\327\325\312\324\305\41")) | ||
| 624 | (switch-to-buffer (get-buffer-create "*test*")) | ||
| 625 | (erase-buffer) | ||
| 626 | (set-buffer-multibyte nil) | ||
| 627 | (insert mail) | ||
| 628 | (rmail-mime-show t) | ||
| 629 | (set-buffer-multibyte t))) | ||
| 630 | |||
| 631 | |||
| 632 | (defun rmail-mime-insert-image (entity) | 615 | (defun rmail-mime-insert-image (entity) |
| 633 | "Decode and insert the image body of MIME-entity ENTITY." | 616 | "Decode and insert the image body of MIME-entity ENTITY." |
| 634 | (let* ((content-type (car (rmail-mime-entity-type entity))) | 617 | (let* ((content-type (car (rmail-mime-entity-type entity))) |
| @@ -813,27 +796,6 @@ directly." | |||
| 813 | (rmail-mime-insert-decoded-text entity))))) | 796 | (rmail-mime-insert-decoded-text entity))))) |
| 814 | (put-text-property beg (point) 'rmail-mime-entity entity))) | 797 | (put-text-property beg (point) 'rmail-mime-entity entity))) |
| 815 | 798 | ||
| 816 | (defun test-rmail-mime-bulk-handler () | ||
| 817 | "Test of a mail used as an example in RFC 2183." | ||
| 818 | (let ((mail "Content-Type: image/jpeg | ||
| 819 | Content-Disposition: attachment; filename=genome.jpeg; | ||
| 820 | modification-date=\"Wed, 12 Feb 1997 16:29:51 -0500\"; | ||
| 821 | Content-Description: a complete map of the human genome | ||
| 822 | Content-Transfer-Encoding: base64 | ||
| 823 | |||
| 824 | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAZQ | ||
| 825 | TFRF////AAAAVcLTfgAAAPZJREFUeNq9ldsOwzAIQ+3//+l1WlvA5ZLsoUiTto4TB+ISoAjy | ||
| 826 | +ITfRBfcAmgRFFeAm+J6uhdKdFhFWUgDkFsK0oUp/9G2//Kj7Jx+5tSKOdBscgUYiKHRS/me | ||
| 827 | WATQdRUvAK0Bnmshmtn79PpaLBbbOZkjKvRnjRZoRswOkG1wFchKew2g9wXVJVZL/m4+B+vv | ||
| 828 | 9AxQQR2Q33SgAYJzzVACdAWjAfRYzYFO9n6SLnydtQHSMxYDMAKqZ/8FS/lTK+zuq3CtK64L | ||
| 829 | UDwbgUEAUmk2Zyg101d6PhCDySgAvTvDgKiuOrc4dLxUb7UMnhGIexyI+d6U+ABuNAP4Simx | ||
| 830 | lgAAAABJRU5ErkJggg== | ||
| 831 | ")) | ||
| 832 | (switch-to-buffer (get-buffer-create "*test*")) | ||
| 833 | (erase-buffer) | ||
| 834 | (insert mail) | ||
| 835 | (rmail-mime-show))) | ||
| 836 | |||
| 837 | (defun rmail-mime-multipart-handler (content-type | 799 | (defun rmail-mime-multipart-handler (content-type |
| 838 | content-disposition | 800 | content-disposition |
| 839 | content-transfer-encoding) | 801 | content-transfer-encoding) |
| @@ -971,37 +933,6 @@ The other arguments are the same as `rmail-mime-multipart-handler'." | |||
| 971 | (rmail-mime-hidden-mode child))))) | 933 | (rmail-mime-hidden-mode child))))) |
| 972 | entities))) | 934 | entities))) |
| 973 | 935 | ||
| 974 | (defun test-rmail-mime-multipart-handler () | ||
| 975 | "Test of a mail used as an example in RFC 2046." | ||
| 976 | (let ((mail "From: Nathaniel Borenstein <nsb@bellcore.com> | ||
| 977 | To: Ned Freed <ned@innosoft.com> | ||
| 978 | Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST) | ||
| 979 | Subject: Sample message | ||
| 980 | MIME-Version: 1.0 | ||
| 981 | Content-type: multipart/mixed; boundary=\"simple boundary\" | ||
| 982 | |||
| 983 | This is the preamble. It is to be ignored, though it | ||
| 984 | is a handy place for composition agents to include an | ||
| 985 | explanatory note to non-MIME conformant readers. | ||
| 986 | |||
| 987 | --simple boundary | ||
| 988 | |||
| 989 | This is implicitly typed plain US-ASCII text. | ||
| 990 | It does NOT end with a linebreak. | ||
| 991 | --simple boundary | ||
| 992 | Content-type: text/plain; charset=us-ascii | ||
| 993 | |||
| 994 | This is explicitly typed plain US-ASCII text. | ||
| 995 | It DOES end with a linebreak. | ||
| 996 | |||
| 997 | --simple boundary-- | ||
| 998 | |||
| 999 | This is the epilogue. It is also to be ignored.")) | ||
| 1000 | (switch-to-buffer (get-buffer-create "*test*")) | ||
| 1001 | (erase-buffer) | ||
| 1002 | (insert mail) | ||
| 1003 | (rmail-mime-show t))) | ||
| 1004 | |||
| 1005 | (defun rmail-mime-insert-multipart (entity) | 936 | (defun rmail-mime-insert-multipart (entity) |
| 1006 | "Presentation handler for a multipart MIME entity." | 937 | "Presentation handler for a multipart MIME entity." |
| 1007 | (let ((current (aref (rmail-mime-entity-display entity) 0)) | 938 | (let ((current (aref (rmail-mime-entity-display entity) 0)) |