[evolution] Add a test case for bug 770073
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Add a test case for bug 770073
- Date: Thu, 18 Aug 2016 08:05:19 +0000 (UTC)
commit c3d1dc33b411f4b317f3ddd82223ee1bf44861bb
Author: Milan Crha <mcrha redhat com>
Date: Thu Aug 18 10:04:48 2016 +0200
Add a test case for bug 770073
e-util/test-html-editor-units.c | 58 +++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
---
diff --git a/e-util/test-html-editor-units.c b/e-util/test-html-editor-units.c
index d826912..76822c8 100644
--- a/e-util/test-html-editor-units.c
+++ b/e-util/test-html-editor-units.c
@@ -2972,6 +2972,63 @@ test_bug_769955 (TestFixture *fixture)
}
}
+static void
+test_bug_770073 (TestFixture *fixture)
+{
+ if (!test_utils_process_commands (fixture,
+ "mode:plain\n")) {
+ g_test_fail ();
+ return;
+ }
+
+ test_utils_insert_content (fixture,
+ "<!-- text/html -->"
+ "<p><span>the 1st line text</span></p>"
+ "<br>"
+ "<p><span>the 3rd line text</span></p>"
+ "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span><span
class=\"-x-evo-cite-body\"></span>",
+ E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
+
+ if (!test_utils_run_simple_test (fixture,
+ "seq:Chcddbb\n",
+ HTML_PREFIX_PLAIN "<p style=\"width: 71ch;\">On Today, User wrote:</p>"
+ "<blockquote type=\"cite\">"
+ "<p style=\"width: 71ch;\">> the 1st line text</p>"
+ "<p style=\"width: 71ch;\">> the 3rd line text</p>"
+ "</blockquote>" HTML_SUFFIX,
+ "On Today, User wrote:\n"
+ "> the 1st line text\n"
+ "> the 3rd line text"))
+ g_test_fail ();
+
+ if (!test_utils_process_commands (fixture,
+ "mode:html\n")) {
+ g_test_fail ();
+ return;
+ }
+
+ test_utils_insert_content (fixture,
+ "<!-- text/html -->"
+ "<p><span>the first line text</span></p>"
+ "<br>"
+ "<p><span>the third line text</span></p>"
+ "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span><span
class=\"-x-evo-cite-body\"></span>",
+ E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
+
+ if (!test_utils_run_simple_test (fixture,
+ "seq:Chcddbb\n",
+ HTML_PREFIX "<p>On Today, User wrote:</p>"
+ "<blockquote id=\"-x-evo-main-cite\" type=\"cite\">"
+ "<p><span>the first line text</span></p>"
+ "<p><span>the third line text</span></p>"
+ "</blockquote>" HTML_SUFFIX,
+ "On Today, User wrote:\n"
+ "> the first line text\n"
+ "> the third line text"))
+ g_test_fail ();
+
+}
+
gint
main (gint argc,
gchar *argv[])
@@ -3134,6 +3191,7 @@ main (gint argc,
add_test ("/bug/769708", test_bug_769708);
add_test ("/bug/769913", test_bug_769913);
add_test ("/bug/769955", test_bug_769955);
+ add_test ("/bug/770073", test_bug_770073);
#undef add_test
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]