branch: elpa/org-mime
commit d71f57dc0d0ae7fac7fe5e2c70656f08ccfd5ea4
Author: Edmund Jorgensen <[email protected]>
Commit: Edmund Jorgensen <[email protected]>
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"
+ "> this is a long-ish para that is broken\n"
+ "> on two lines\n"
+ ">\n"
+ "> 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)