emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r106473: Move rmailmm test functions


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r106473: Move rmailmm test functions to test/ directory.
Date: Mon, 21 Nov 2011 21:55:06 -0500
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 106473
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2011-11-21 21:55:06 -0500
message:
  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.
added:
  test/rmailmm.el
modified:
  lisp/ChangeLog
  lisp/mail/rmailmm.el
  test/ChangeLog
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-11-21 23:59:09 +0000
+++ b/lisp/ChangeLog    2011-11-22 02:55:06 +0000
@@ -1,3 +1,9 @@
+2011-11-22  Glenn Morris  <address@hidden>
+
+       * mail/rmailmm.el (test-rmail-mime-handler)
+       (test-rmail-mime-bulk-handler)
+       (test-rmail-mime-multipart-handler): Move tests to test/ directory.
+
 2011-11-21  Juri Linkov  <address@hidden>
 
        * calc/calc.el (calc-read-key-sequence): Let-bind 
`input-method-function'

=== modified file 'lisp/mail/rmailmm.el'
--- a/lisp/mail/rmailmm.el      2011-11-19 11:49:54 +0000
+++ b/lisp/mail/rmailmm.el      2011-11-22 02:55:06 +0000
@@ -612,23 +612,6 @@
          (rmail-mime-insert-decoded-text entity)))
     (put-text-property beg (point) 'rmail-mime-entity entity)))
 
-;; FIXME move to the test/ directory?
-(defun test-rmail-mime-handler ()
-  "Test of a mail using no MIME parts at all."
-  (let ((mail "To: address@hidden
-Content-Type: text/plain; charset=koi8-r
-Content-Transfer-Encoding: 8bit
-MIME-Version: 1.0
-
-\372\304\322\301\327\323\324\327\325\312\324\305\41"))
-    (switch-to-buffer (get-buffer-create "*test*"))
-    (erase-buffer)
-    (set-buffer-multibyte nil)
-    (insert mail)
-    (rmail-mime-show t)
-    (set-buffer-multibyte t)))
-
-
 (defun rmail-mime-insert-image (entity)
   "Decode and insert the image body of MIME-entity ENTITY."
   (let* ((content-type (car (rmail-mime-entity-type entity)))
@@ -813,27 +796,6 @@
                 (rmail-mime-insert-decoded-text entity)))))
     (put-text-property beg (point) 'rmail-mime-entity entity)))
 
-(defun test-rmail-mime-bulk-handler ()
-  "Test of a mail used as an example in RFC 2183."
-  (let ((mail "Content-Type: image/jpeg
-Content-Disposition: attachment; filename=genome.jpeg;
-  modification-date=\"Wed, 12 Feb 1997 16:29:51 -0500\";
-Content-Description: a complete map of the human genome
-Content-Transfer-Encoding: base64
-
-iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAZQ
-TFRF////AAAAVcLTfgAAAPZJREFUeNq9ldsOwzAIQ+3//+l1WlvA5ZLsoUiTto4TB+ISoAjy
-+ITfRBfcAmgRFFeAm+J6uhdKdFhFWUgDkFsK0oUp/9G2//Kj7Jx+5tSKOdBscgUYiKHRS/me
-WATQdRUvAK0Bnmshmtn79PpaLBbbOZkjKvRnjRZoRswOkG1wFchKew2g9wXVJVZL/m4+B+vv
-9AxQQR2Q33SgAYJzzVACdAWjAfRYzYFO9n6SLnydtQHSMxYDMAKqZ/8FS/lTK+zuq3CtK64L
-UDwbgUEAUmk2Zyg101d6PhCDySgAvTvDgKiuOrc4dLxUb7UMnhGIexyI+d6U+ABuNAP4Simx
-lgAAAABJRU5ErkJggg==
-"))
-    (switch-to-buffer (get-buffer-create "*test*"))
-    (erase-buffer)
-    (insert mail)
-    (rmail-mime-show)))
-
 (defun rmail-mime-multipart-handler (content-type
                                     content-disposition
                                     content-transfer-encoding)
@@ -971,37 +933,6 @@
                (rmail-mime-hidden-mode child)))))
       entities)))
 
-(defun test-rmail-mime-multipart-handler ()
-  "Test of a mail used as an example in RFC 2046."
-  (let ((mail "From: Nathaniel Borenstein <address@hidden>
-To: Ned Freed <address@hidden>
-Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST)
-Subject: Sample message
-MIME-Version: 1.0
-Content-type: multipart/mixed; boundary=\"simple boundary\"
-
-This is the preamble.  It is to be ignored, though it
-is a handy place for composition agents to include an
-explanatory note to non-MIME conformant readers.
-
---simple boundary
-
-This is implicitly typed plain US-ASCII text.
-It does NOT end with a linebreak.
---simple boundary
-Content-type: text/plain; charset=us-ascii
-
-This is explicitly typed plain US-ASCII text.
-It DOES end with a linebreak.
-
---simple boundary--
-
-This is the epilogue.  It is also to be ignored."))
-    (switch-to-buffer (get-buffer-create "*test*"))
-    (erase-buffer)
-    (insert mail)
-    (rmail-mime-show t)))
-
 (defun rmail-mime-insert-multipart (entity)
   "Presentation handler for a multipart MIME entity."
   (let ((current (aref (rmail-mime-entity-display entity) 0))

=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2011-11-20 03:48:53 +0000
+++ b/test/ChangeLog    2011-11-22 02:55:06 +0000
@@ -1,3 +1,7 @@
+2011-11-22  Glenn Morris  <address@hidden>
+
+       * rmailmm.el: New file, split from lisp/mail/rmailmm.el.
+
 2011-11-20  Juanma Barranquero  <address@hidden>
 
        * cedet/semantic-utest-c.el (semantic-utest-c-comparisons): Fix typo.

=== added file 'test/rmailmm.el'
--- a/test/rmailmm.el   1970-01-01 00:00:00 +0000
+++ b/test/rmailmm.el   2011-11-22 02:55:06 +0000
@@ -0,0 +1,93 @@
+;;; rmailmm.el --- tests for mail/rmailmm.el
+
+;; Copyright (C) 2006-2011  Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'rmailmm)
+
+(defun rmailmm-test-handler ()
+  "Test of a mail using no MIME parts at all."
+  (let ((mail "To: address@hidden
+Content-Type: text/plain; charset=koi8-r
+Content-Transfer-Encoding: 8bit
+MIME-Version: 1.0
+
+\372\304\322\301\327\323\324\327\325\312\324\305\41"))
+    (switch-to-buffer (get-buffer-create "*test*"))
+    (erase-buffer)
+    (set-buffer-multibyte nil)
+    (insert mail)
+    (rmail-mime-show t)
+    (set-buffer-multibyte t)))
+
+(defun rmailmm-test-bulk-handler ()
+  "Test of a mail used as an example in RFC 2183."
+  (let ((mail "Content-Type: image/jpeg
+Content-Disposition: attachment; filename=genome.jpeg;
+  modification-date=\"Wed, 12 Feb 1997 16:29:51 -0500\";
+Content-Description: a complete map of the human genome
+Content-Transfer-Encoding: base64
+
+iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAZQ
+TFRF////AAAAVcLTfgAAAPZJREFUeNq9ldsOwzAIQ+3//+l1WlvA5ZLsoUiTto4TB+ISoAjy
++ITfRBfcAmgRFFeAm+J6uhdKdFhFWUgDkFsK0oUp/9G2//Kj7Jx+5tSKOdBscgUYiKHRS/me
+WATQdRUvAK0Bnmshmtn79PpaLBbbOZkjKvRnjRZoRswOkG1wFchKew2g9wXVJVZL/m4+B+vv
+9AxQQR2Q33SgAYJzzVACdAWjAfRYzYFO9n6SLnydtQHSMxYDMAKqZ/8FS/lTK+zuq3CtK64L
+UDwbgUEAUmk2Zyg101d6PhCDySgAvTvDgKiuOrc4dLxUb7UMnhGIexyI+d6U+ABuNAP4Simx
+lgAAAABJRU5ErkJggg==
+"))
+    (switch-to-buffer (get-buffer-create "*test*"))
+    (erase-buffer)
+    (insert mail)
+    (rmail-mime-show)))
+
+(defun rmailmm-test-multipart-handler ()
+  "Test of a mail used as an example in RFC 2046."
+  (let ((mail "From: Nathaniel Borenstein <address@hidden>
+To: Ned Freed <address@hidden>
+Date: Sun, 21 Mar 1993 23:56:48 -0800 (PST)
+Subject: Sample message
+MIME-Version: 1.0
+Content-type: multipart/mixed; boundary=\"simple boundary\"
+
+This is the preamble.  It is to be ignored, though it
+is a handy place for composition agents to include an
+explanatory note to non-MIME conformant readers.
+
+--simple boundary
+
+This is implicitly typed plain US-ASCII text.
+It does NOT end with a linebreak.
+--simple boundary
+Content-type: text/plain; charset=us-ascii
+
+This is explicitly typed plain US-ASCII text.
+It DOES end with a linebreak.
+
+--simple boundary--
+
+This is the epilogue.  It is also to be ignored."))
+    (switch-to-buffer (get-buffer-create "*test*"))
+    (erase-buffer)
+    (insert mail)
+    (rmail-mime-show t)))
+
+;;; rmailmm.el ends here


reply via email to

[Prev in Thread] Current Thread [Next in Thread]