emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/org-mime d71f57dc0d 096/118: Add a simple test for quoting


From: ELPA Syncer
Subject: [nongnu] elpa/org-mime d71f57dc0d 096/118: Add a simple test for quoting of multi-line paragraphs
Date: Wed, 5 Jan 2022 07:58:50 -0500 (EST)

branch: elpa/org-mime
commit d71f57dc0d0ae7fac7fe5e2c70656f08ccfd5ea4
Author: Edmund Jorgensen <tomheon@gmail.com>
Commit: Edmund Jorgensen <tomheon@gmail.com>

    Add a simple test for quoting of multi-line paragraphs
---
 test/org-mime-tests.el | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/test/org-mime-tests.el b/test/org-mime-tests.el
index 89097e4c18..95d3344139 100644
--- a/test/org-mime-tests.el
+++ b/test/org-mime-tests.el
@@ -245,4 +245,35 @@
       (should-not (string-match "SECTION_ONE" str)))
     (kill-buffer orgBuf)))
 
+(ert-deftest test-org-mime-beautify-quoted-para-breaks ()
+    (setq html (concat "<p>\n"
+                       "Hello there\n"
+                       "</p>\n"
+                       "\n"
+                       "<p>\n"
+                       "&gt; this is a long-ish para that is broken\n"
+                       "&gt; on two lines\n"
+                       "&gt;\n"
+                       "&gt; followed by a single-line para\n"
+                       "</p>\n"))
+    (setq expected (concat "<p>\n"
+                           "Hello there\n"
+                           "</p>\n"
+                           "\n"
+                           "<p>\n"
+                           "<blockquote class=\"gmail_quote\" style=\"margin:0 
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex\">\n"
+                           "\n"
+                           "<div>this is a long-ish para that is broken\n"
+                           "on two lines\n"
+                           "</div>\n"
+                           "<div>\n"
+                           "<br /></div>\n"
+                           "<div>followed by a single-line para\n"
+                           "\n"
+                           "</div></blockquote>\n"
+                           "</p>\n"))
+    (setq beautified (org-mime-beautify-quoted html))
+    (should (equal beautified expected))
+)
+
 (ert-run-tests-batch-and-exit)



reply via email to

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