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 /test | |
| 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 'test')
| -rw-r--r-- | test/ChangeLog | 4 | ||||
| -rw-r--r-- | test/rmailmm.el | 93 |
2 files changed, 97 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 80c26a9cf44..04a70737d61 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-11-22 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * rmailmm.el: New file, split from lisp/mail/rmailmm.el. | ||
| 4 | |||
| 1 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> | 5 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 6 | ||
| 3 | * cedet/semantic-utest-c.el (semantic-utest-c-comparisons): Fix typo. | 7 | * cedet/semantic-utest-c.el (semantic-utest-c-comparisons): Fix typo. |
diff --git a/test/rmailmm.el b/test/rmailmm.el new file mode 100644 index 00000000000..97577ee35cb --- /dev/null +++ b/test/rmailmm.el | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | ;;; rmailmm.el --- tests for mail/rmailmm.el | ||
| 2 | |||
| 3 | ;; Copyright (C) 2006-2011 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Commentary: | ||
| 21 | |||
| 22 | ;;; Code: | ||
| 23 | |||
| 24 | (require 'rmailmm) | ||
| 25 | |||
| 26 | (defun rmailmm-test-handler () | ||
| 27 | "Test of a mail using no MIME parts at all." | ||
| 28 | (let ((mail "To: alex@gnu.org | ||
| 29 | Content-Type: text/plain; charset=koi8-r | ||
| 30 | Content-Transfer-Encoding: 8bit | ||
| 31 | MIME-Version: 1.0 | ||
| 32 | |||
| 33 | \372\304\322\301\327\323\324\327\325\312\324\305\41")) | ||
| 34 | (switch-to-buffer (get-buffer-create "*test*")) | ||
| 35 | (erase-buffer) | ||
| 36 | (set-buffer-multibyte nil) | ||
| 37 | (insert mail) | ||
| 38 | (rmail-mime-show t) | ||
| 39 | (set-buffer-multibyte t))) | ||
| 40 | |||
| 41 | (defun rmailmm-test-bulk-handler () | ||
| 42 | "Test of a mail used as an example in RFC 2183." | ||
| 43 | (let ((mail "Content-Type: image/jpeg | ||
| 44 | Content-Disposition: attachment; filename=genome.jpeg; | ||
| 45 | modification-date=\"Wed, 12 Feb 1997 16:29:51 -0500\"; | ||
| 46 | Content-Description: a complete map of the human genome | ||
| 47 | Content-Transfer-Encoding: base64 | ||
| 48 | |||
| 49 | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAZQ | ||
| 50 | TFRF////AAAAVcLTfgAAAPZJREFUeNq9ldsOwzAIQ+3//+l1WlvA5ZLsoUiTto4TB+ISoAjy | ||
| 51 | +ITfRBfcAmgRFFeAm+J6uhdKdFhFWUgDkFsK0oUp/9G2//Kj7Jx+5tSKOdBscgUYiKHRS/me | ||
| 52 | WATQdRUvAK0Bnmshmtn79PpaLBbbOZkjKvRnjRZoRswOkG1wFchKew2g9wXVJVZL/m4+B+vv | ||
| 53 | 9AxQQR2Q33SgAYJzzVACdAWjAfRYzYFO9n6SLnydtQHSMxYDMAKqZ/8FS/lTK+zuq3CtK64L | ||
| 54 | UDwbgUEAUmk2Zyg101d6PhCDySgAvTvDgKiuOrc4dLxUb7UMnhGIexyI+d6U+ABuNAP4Simx | ||
| 55 | lgAAAABJRU5ErkJggg== | ||
| 56 | ")) | ||
| 57 | (switch-to-buffer (get-buffer-create "*test*")) | ||
| 58 | (erase-buffer) | ||
| 59 | (insert mail) | ||
| 60 | (rmail-mime-show))) | ||
| 61 | |||
| 62 | (defun rmailmm-test-multipart-handler () | ||
| 63 | "Test of a mail used as an example in RFC 2046." | ||
| 64 | (let ((mail "From: Nathaniel Borenstein <nsb@bellcore.com> | ||
| 65 | To: Ned Freed <ned@innosoft.com> | ||
| 66 | Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST) | ||
| 67 | Subject: Sample message | ||
| 68 | MIME-Version: 1.0 | ||
| 69 | Content-type: multipart/mixed; boundary=\"simple boundary\" | ||
| 70 | |||
| 71 | This is the preamble. It is to be ignored, though it | ||
| 72 | is a handy place for composition agents to include an | ||
| 73 | explanatory note to non-MIME conformant readers. | ||
| 74 | |||
| 75 | --simple boundary | ||
| 76 | |||
| 77 | This is implicitly typed plain US-ASCII text. | ||
| 78 | It does NOT end with a linebreak. | ||
| 79 | --simple boundary | ||
| 80 | Content-type: text/plain; charset=us-ascii | ||
| 81 | |||
| 82 | This is explicitly typed plain US-ASCII text. | ||
| 83 | It DOES end with a linebreak. | ||
| 84 | |||
| 85 | --simple boundary-- | ||
| 86 | |||
| 87 | This is the epilogue. It is also to be ignored.")) | ||
| 88 | (switch-to-buffer (get-buffer-create "*test*")) | ||
| 89 | (erase-buffer) | ||
| 90 | (insert mail) | ||
| 91 | (rmail-mime-show t))) | ||
| 92 | |||
| 93 | ;;; rmailmm.el ends here | ||