Add HTML editor unit test for bug 788829
[evolution.git] / src / e-util / test-html-editor-units-bugs.c
blob58a8a36a7d4022a0259c4d3739c1c73ff1873616
1 /*
2 * Copyright (C) 2016 Red Hat, Inc. (www.redhat.com)
4 * This library is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 * for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library. If not, see <http://www.gnu.org/licenses/>.
17 #include "evolution-config.h"
19 #include <e-util/e-util.h>
21 #include "test-html-editor-units-utils.h"
23 #include "test-html-editor-units-bugs.h"
25 static void
26 test_bug_726548 (TestFixture *fixture)
28 gboolean success;
29 gchar *text;
30 const gchar *expected_plain =
31 "aaa\n"
32 " 1. a\n"
33 " 2. b\n"
34 " 3. c\n";
36 /* This test is known to fail, skip it. */
37 printf ("SKIPPED ");
38 return;
40 if (!test_utils_run_simple_test (fixture,
41 "mode:plain\n"
42 "type:aaa\\n\n"
43 "action:style-list-number\n"
44 "type:a\\nb\\nc\\n\\n\n"
45 "seq:C\n"
46 "type:ac\n"
47 "seq:c\n",
48 HTML_PREFIX "<div style=\"width: 71ch;\">aaa</div>"
49 "<ol style=\"width: 65ch;\">"
50 "<li>a</li><li>b</li><li>c</li></ol>"
51 "<div style=\"width: 71ch;\"><br></div>" HTML_SUFFIX,
52 expected_plain)) {
53 g_test_fail ();
54 return;
57 text = test_utils_get_clipboard_text (FALSE);
58 success = test_utils_html_equal (fixture, text, expected_plain);
60 if (!success) {
61 g_warning ("%s: clipboard Plain text \n---%s---\n does not match expected Plain\n---%s---",
62 G_STRFUNC, text, expected_plain);
63 g_free (text);
64 g_test_fail ();
65 } else {
66 g_free (text);
70 static void
71 test_bug_750657 (TestFixture *fixture)
73 if (!test_utils_process_commands (fixture,
74 "mode:html\n")) {
75 g_test_fail ();
76 return;
79 test_utils_insert_content (fixture,
80 "<html><head></head><body>\n"
81 "<blockquote type=\"cite\">\n"
82 "<div>This is the first paragraph of a quoted text which has some long text to test. It has the second sentence as well.</div>\n"
83 "<div><br></div>\n"
84 "<div>This is the third paragraph of a quoted text which has some long text to test. It has the second sentence as well.</div>\n"
85 "<blockquote type=\"cite\">\n"
86 "<div>This is the first paragraph of a sub-quoted text which has some long text to test. It has the second sentence as well.</div>\n"
87 "<br>\n"
88 "</blockquote>\n"
89 "<div>This is the fourth paragraph of a quoted text which has some long text to test. It has the second sentence as well.</div>\n"
90 "</blockquote>\n"
91 "<div><br></div>\n"
92 "</body></html>",
93 E_CONTENT_EDITOR_INSERT_TEXT_HTML);
95 if (!test_utils_run_simple_test (fixture,
96 "seq:uuuSuusD\n",
97 HTML_PREFIX
98 "<blockquote type=\"cite\">\n"
99 "<div>This is the first paragraph of a quoted text which has some long text to test. It has the second sentence as well.</div>\n"
100 "<div><br></div>\n"
101 "<div>This is the third paragraph of a quoted text which has some long text to test. It has the second sentence as well.</div>\n"
102 "<blockquote type=\"cite\">\n"
103 "<div><br></div>\n"
104 "</blockquote>\n"
105 "<div>This is the fourth paragraph of a quoted text which has some long text to test. It has the second sentence as well.</div>\n"
106 "</blockquote>\n"
107 "<div><br></div>"
108 HTML_SUFFIX,
109 NULL)) {
110 g_test_fail ();
111 return;
115 static void
116 test_bug_760989 (TestFixture *fixture)
118 if (!test_utils_process_commands (fixture,
119 "mode:html\n"
120 "type:a\n")) {
121 g_test_fail ();
122 return;
125 test_utils_insert_content (fixture,
126 "<html><head></head><body>\n"
127 "One line before quotation<br>\n"
128 "<blockquote type=\"cite\">\n"
129 "<div>Single line quoted.</div>\n"
130 "</blockquote>\n"
131 "</body></html>",
132 E_CONTENT_EDITOR_INSERT_TEXT_HTML);
134 if (!test_utils_run_simple_test (fixture,
135 "seq:ChcD\n",
136 HTML_PREFIX "<div>One line before quotation</div>\n"
137 "<blockquote type=\"cite\">\n"
138 "<div>Single line quoted.</div>\n"
139 "</blockquote>" HTML_SUFFIX,
140 "One line before quotation\n"
141 "> Single line quoted.")) {
142 g_test_fail ();
143 return;
146 if (!test_utils_run_simple_test (fixture,
147 "seq:Cecb\n",
148 HTML_PREFIX "<div>One line before quotation</div>\n"
149 "<blockquote type=\"cite\">\n"
150 "<div>Single line quoted</div>\n"
151 "</blockquote>" HTML_SUFFIX,
152 "One line before quotation\n"
153 "> Single line quoted")) {
154 g_test_fail ();
155 return;
159 static void
160 test_bug_767903 (TestFixture *fixture)
162 if (!test_utils_run_simple_test (fixture,
163 "mode:plain\n"
164 "type:This is the first line:\\n\n"
165 "action:style-list-bullet\n"
166 "type:First item\\n\n"
167 "type:Second item\n",
168 HTML_PREFIX "<div style=\"width: 71ch;\">This is the first line:</div>"
169 "<ul style=\"width: 68ch;\">"
170 "<li>First item</li><li>Second item<br></li></ul>" HTML_SUFFIX,
171 "This is the first line:\n"
172 " * First item\n"
173 " * Second item")) {
174 g_test_fail ();
175 return;
178 if (!test_utils_run_simple_test (fixture,
179 "seq:uhb\n"
180 "undo:undo\n",
181 HTML_PREFIX "<div style=\"width: 71ch;\">This is the first line:</div>"
182 "<ul style=\"width: 68ch;\">"
183 "<li>First item</li><li>Second item<br></li></ul>" HTML_SUFFIX,
184 "This is the first line:\n"
185 " * First item\n"
186 " * Second item")) {
187 g_test_fail ();
188 return;
192 static void
193 test_bug_769708 (TestFixture *fixture)
195 if (!test_utils_process_commands (fixture,
196 "mode:plain\n")) {
197 g_test_fail ();
198 return;
201 test_utils_insert_content (fixture,
202 "<html><head><style id=\"-x-evo-quote-style\" type=\"text/css\">.-x-evo-quoted { -webkit-user-select: none; }</style>"
203 "<style id=\"-x-evo-style-a\" type=\"text/css\">a { cursor: text; }</style></head>"
204 "<body data-evo-draft=\"\" data-evo-plain-text=\"\" spellcheck=\"true\">"
205 "<div data-evo-paragraph=\"\" id=\"-x-evo-input-start\">aaa</div>"
206 "<div class=\"-x-evo-signature-wrapper\"><span class=\"-x-evo-signature\" id=\"autogenerated\"><pre>-- <br></pre>"
207 "<div data-evo-paragraph=\"\">user &lt;user@no.where&gt;</div>"
208 "</span></div></body></html>",
209 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
211 if (!test_utils_run_simple_test (fixture,
213 HTML_PREFIX "<div>aaa</div><div><span><pre>-- <br></pre>"
214 "<div>user &lt;user@no.where&gt;</div>"
215 "</span></div>" HTML_SUFFIX,
216 "aaa\n"
217 "-- \n"
218 "user <user@no.where>"))
219 g_test_fail ();
222 static void
223 test_bug_769913 (TestFixture *fixture)
225 if (!test_utils_process_commands (fixture,
226 "mode:html\n")) {
227 g_test_fail ();
228 return;
231 if (!test_utils_run_simple_test (fixture,
232 "type:ab\n"
233 "seq:ltlD\n",
234 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
235 "ab")) {
236 g_test_fail ();
237 return;
240 if (!test_utils_run_simple_test (fixture,
241 "seq:ttllDD\n",
242 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
243 "ab")) {
244 g_test_fail ();
245 return;
248 if (!test_utils_run_simple_test (fixture,
249 "seq:ttlDlD\n",
250 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
251 "ab")) {
252 g_test_fail ();
253 return;
256 if (!test_utils_run_simple_test (fixture,
257 "seq:tttlllDDD\n",
258 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
259 "ab")) {
260 g_test_fail ();
261 return;
264 if (!test_utils_run_simple_test (fixture,
265 "seq:tttlDlDlD\n",
266 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
267 "ab")) {
268 g_test_fail ();
269 return;
272 if (!test_utils_run_simple_test (fixture,
273 "seq:tb\n",
274 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
275 "ab")) {
276 g_test_fail ();
277 return;
280 if (!test_utils_run_simple_test (fixture,
281 "seq:ttbb\n",
282 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
283 "ab")) {
284 g_test_fail ();
285 return;
288 if (!test_utils_run_simple_test (fixture,
289 "seq:ttlbrb\n",
290 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
291 "ab")) {
292 g_test_fail ();
293 return;
296 if (!test_utils_run_simple_test (fixture,
297 "seq:tttbbb\n",
298 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
299 "ab")) {
300 g_test_fail ();
301 return;
304 if (!test_utils_run_simple_test (fixture,
305 "seq:tttllbrbrb\n",
306 HTML_PREFIX "<div>ab</div>" HTML_SUFFIX,
307 "ab")) {
308 g_test_fail ();
309 return;
313 static void
314 test_bug_769955 (TestFixture *fixture)
316 test_utils_set_clipboard_text ("http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines", FALSE);
318 /* Use paste action, pretty the same as Ctrl+V */
320 if (!test_utils_run_simple_test (fixture,
321 "mode:plain\n"
322 "action:paste\n"
323 "seq:ll\n"
324 "action:style-preformat\n",
325 HTML_PREFIX "<pre>"
326 "<a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
327 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>"
328 HTML_SUFFIX,
329 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
330 g_test_fail ();
331 return;
334 if (!test_utils_run_simple_test (fixture,
335 "seq:C\n"
336 "type:a\n"
337 "action:style-normal\n"
338 "seq:Dc\n"
339 "type:[1] \n"
340 "action:paste\n"
341 "action:style-preformat\n",
342 HTML_PREFIX "<pre>"
343 "[1] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
344 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
345 "[1] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
346 g_test_fail ();
347 return;
350 if (!test_utils_run_simple_test (fixture,
351 "seq:C\n"
352 "type:a\n"
353 "action:style-normal\n"
354 "seq:Dc\n"
355 "type:[2] \n"
356 "action:paste\n"
357 "seq:h\n"
358 "action:style-preformat\n",
359 HTML_PREFIX "<pre>"
360 "[2] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
361 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
362 "[2] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
363 g_test_fail ();
364 return;
367 if (!test_utils_run_simple_test (fixture,
368 "seq:C\n"
369 "type:a\n"
370 "action:style-normal\n"
371 "seq:Dc\n"
372 "type:[3] \n"
373 "action:paste\n"
374 "seq:Chc\n"
375 "action:style-preformat\n",
376 HTML_PREFIX "<pre>"
377 "[3] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
378 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
379 "[3] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
380 g_test_fail ();
381 return;
384 if (!test_utils_run_simple_test (fixture,
385 "seq:C\n"
386 "type:a\n"
387 "action:style-normal\n"
388 "seq:Dc\n"
389 "type:[4] \n"
390 "action:paste\n"
391 "seq:l\n"
392 "action:style-preformat\n",
393 HTML_PREFIX "<pre>"
394 "[4] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
395 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
396 "[4] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
397 g_test_fail ();
398 return;
401 /* Use Shift+Insert instead of paste action */
403 if (!test_utils_run_simple_test (fixture,
404 "seq:C\n"
405 "type:a\n"
406 "action:style-normal\n"
407 "seq:Dc\n"
408 "seq:Sis\n"
409 "seq:ll\n"
410 "action:style-preformat\n",
411 HTML_PREFIX "<pre>"
412 "<a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
413 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>"
414 HTML_SUFFIX,
415 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
416 g_test_fail ();
417 return;
420 if (!test_utils_run_simple_test (fixture,
421 "seq:C\n"
422 "type:a\n"
423 "action:style-normal\n"
424 "seq:Dc\n"
425 "type:[5] \n"
426 "seq:Sis\n"
427 "action:style-preformat\n",
428 HTML_PREFIX "<pre>"
429 "[5] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
430 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
431 "[5] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
432 g_test_fail ();
433 return;
436 if (!test_utils_run_simple_test (fixture,
437 "seq:C\n"
438 "type:a\n"
439 "action:style-normal\n"
440 "seq:Dc\n"
441 "type:[6] \n"
442 "seq:Sis\n"
443 "seq:h\n"
444 "action:style-preformat\n",
445 HTML_PREFIX "<pre>"
446 "[6] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
447 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
448 "[6] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
449 g_test_fail ();
450 return;
453 if (!test_utils_run_simple_test (fixture,
454 "seq:C\n"
455 "type:a\n"
456 "action:style-normal\n"
457 "seq:Dc\n"
458 "type:[7] \n"
459 "seq:Sis\n"
460 "seq:Chc\n"
461 "action:style-preformat\n",
462 HTML_PREFIX "<pre>"
463 "[7] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
464 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
465 "[7] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
466 g_test_fail ();
467 return;
470 if (!test_utils_run_simple_test (fixture,
471 "seq:C\n"
472 "type:a\n"
473 "action:style-normal\n"
474 "seq:Dc\n"
475 "type:[8] \n"
476 "seq:Sis\n"
477 "seq:l\n"
478 "action:style-preformat\n",
479 HTML_PREFIX "<pre>"
480 "[8] <a href=\"http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines\">"
481 "http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines</a></pre>" HTML_SUFFIX,
482 "[8] http://www.example.com/this-is-a-very-long-link-which-should-not-be-wrapped-into-multiple-lines")) {
483 g_test_fail ();
484 return;
488 static void
489 test_bug_770073 (TestFixture *fixture)
491 if (!test_utils_process_commands (fixture,
492 "mode:plain\n")) {
493 g_test_fail ();
494 return;
497 test_utils_insert_content (fixture,
498 "<!-- text/html -->"
499 "<div><span>the 1st line text</span></div>"
500 "<br>"
501 "<div><span>the 3rd line text</span></div>"
502 "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span><span class=\"-x-evo-cite-body\"></span>",
503 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
505 if (!test_utils_run_simple_test (fixture,
506 "seq:Chcddbb\n",
507 HTML_PREFIX "<div style=\"width: 71ch;\">On Today, User wrote:</div>"
508 "<blockquote type=\"cite\">"
509 "<div style=\"width: 71ch;\">&gt; the 1st line text</div>"
510 "<div style=\"width: 71ch;\">&gt; the 3rd line text</div>"
511 "</blockquote>" HTML_SUFFIX,
512 "On Today, User wrote:\n"
513 "> the 1st line text\n"
514 "> the 3rd line text")) {
515 g_test_fail ();
516 return;
519 if (!test_utils_process_commands (fixture,
520 "mode:html\n")) {
521 g_test_fail ();
522 return;
525 test_utils_insert_content (fixture,
526 "<!-- text/html -->"
527 "<div><span>the first line text</span></div>"
528 "<br>"
529 "<div><span>the third line text</span></div>"
530 "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span><span class=\"-x-evo-cite-body\"></span>",
531 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
533 if (!test_utils_run_simple_test (fixture,
534 "seq:Chcddbb\n",
535 HTML_PREFIX "<div>On Today, User wrote:</div>"
536 "<blockquote type=\"cite\">"
537 "<div><span>the first line text</span></div>"
538 "<div><span>the third line text</span></div>"
539 "</blockquote>" HTML_SUFFIX,
540 "On Today, User wrote:\n"
541 "> the first line text\n"
542 "> the third line text"))
543 g_test_fail ();
547 static void
548 test_bug_770074 (TestFixture *fixture)
550 if (!test_utils_process_commands (fixture,
551 "mode:plain\n")) {
552 g_test_fail ();
553 return;
556 test_utils_insert_content (fixture,
557 "<!-- text/html -->"
558 "<div><span>the 1st line text</span></div>"
559 "<br>"
560 "<div><span>the 3rd line text</span></div>"
561 "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span><span class=\"-x-evo-cite-body\"></span>",
562 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
564 if (!test_utils_run_simple_test (fixture,
565 "seq:Chcddbb\n"
566 "seq:n\n"
567 "undo:undo\n",
568 HTML_PREFIX "<div style=\"width: 71ch;\">On Today, User wrote:</div>"
569 "<blockquote type=\"cite\">"
570 "<div style=\"width: 71ch;\">&gt; the 1st line text</div>"
571 "<div style=\"width: 71ch;\">&gt; the 3rd line text</div>"
572 "</blockquote>" HTML_SUFFIX,
573 "On Today, User wrote:\n"
574 "> the 1st line text\n"
575 "> the 3rd line text"))
576 g_test_fail ();
579 static void
580 test_bug_771044 (TestFixture *fixture)
582 if (!test_utils_run_simple_test (fixture,
583 "type:123 456\\n789 abc\\n\n"
584 "seq:uuhSdsD\n",
585 HTML_PREFIX
586 "<div>789 abc</div>"
587 "<div><br></div>"
588 HTML_SUFFIX,
589 "789 abc\n"))
590 g_test_fail ();
593 static void
594 test_bug_771131 (TestFixture *fixture)
596 if (!test_utils_process_commands (fixture,
597 "mode:plain\n")) {
598 g_test_fail ();
599 return;
602 test_utils_insert_content (fixture,
603 "<body><pre>On &lt;date1&gt;, &lt;name1&gt; wrote:\n"
604 "<blockquote type=\"cite\">\n"
605 "Hello\n"
606 "\n"
607 "Goodbye</blockquote>"
608 "<div><span>the 3rd line text</span></div>"
609 "</pre><span class=\"-x-evo-to-body\" data-credits=\"On Sat, 2016-09-10 at 20:00 +0000, example@example.com wrote:\"></span>"
610 "<span class=\"-x-evo-cite-body\"></span></body>",
611 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
613 if (!test_utils_run_simple_test (fixture,
615 HTML_PREFIX "<div style=\"width: 71ch;\">On Sat, 2016-09-10 at 20:00 +0000, example@example.com wrote:</div>"
616 "<blockquote type=\"cite\">"
617 "<div style=\"width: 71ch;\">&gt; On &lt;date1&gt;, &lt;name1&gt; wrote:</div>"
618 "<blockquote type=\"cite\">"
619 "<div style=\"width: 71ch;\">&gt; &gt; Hello</div>"
620 "<div style=\"width: 71ch;\">&gt; &gt; <br></div>"
621 "<div style=\"width: 71ch;\">&gt; &gt; Goodbye</div>"
622 "</blockquote>"
623 "<div style=\"width: 71ch;\">&gt; <br></div>"
624 "<div style=\"width: 71ch;\">&gt; the 3rd line text</div>"
625 "</blockquote>"
626 HTML_SUFFIX,
627 "On Sat, 2016-09-10 at 20:00 +0000, example@example.com wrote:\n"
628 "> On <date1>, <name1> wrote:\n"
629 "> > Hello\n"
630 "> > \n"
631 "> > Goodbye\n"
632 "> \n"
633 "> the 3rd line text"))
634 g_test_fail ();
637 static void
638 test_bug_771493 (TestFixture *fixture)
640 if (!test_utils_process_commands (fixture,
641 "mode:plain\n")) {
642 g_test_fail ();
643 return;
646 test_utils_insert_content (fixture,
647 "<body><pre><br>"
648 "----- Original Message -----\n"
649 "<blockquote type=\"cite\">\n"
650 "This week summary:"
651 "</blockquote>"
652 "</pre><span class=\"-x-evo-to-body\" data-credits=\"On Thu, 2016-09-15 at 08:08 -0400, user wrote:\"></span>"
653 "<span class=\"-x-evo-cite-body\"></span></body>",
654 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
656 if (!test_utils_run_simple_test (fixture,
658 HTML_PREFIX "<div style=\"width: 71ch;\">On Thu, 2016-09-15 at 08:08 -0400, user wrote:</div>"
659 "<blockquote type=\"cite\">"
660 "<div style=\"width: 71ch;\">&gt; <br></div>"
661 "<div style=\"width: 71ch;\">&gt; ----- Original Message -----</div>"
662 "<blockquote type=\"cite\">"
663 "<div style=\"width: 71ch;\">&gt; &gt; This week summary:</div>"
664 "</blockquote>"
665 "</blockquote>"
666 HTML_SUFFIX,
667 "On Thu, 2016-09-15 at 08:08 -0400, user wrote:\n"
668 "> \n"
669 "> ----- Original Message -----\n"
670 "> > This week summary:"))
671 g_test_fail ();
674 static void
675 test_bug_772171 (TestFixture *fixture)
677 if (!test_utils_process_commands (fixture,
678 "mode:plain\n")) {
679 g_test_fail ();
680 return;
683 test_utils_insert_content (fixture,
684 "<body><pre>a\n"
685 "b\n"
686 "</pre>"
687 "<span class=\"-x-evo-to-body\" data-credits=\"On Thu, 2016-09-15 at 08:08 -0400, user wrote:\"></span>"
688 "<span class=\"-x-evo-cite-body\"></span></body>",
689 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
691 if (!test_utils_run_simple_test (fixture,
692 "seq:ddeb",
693 HTML_PREFIX "<div style=\"width: 71ch;\">On Thu, 2016-09-15 at 08:08 -0400, user wrote:</div>"
694 "<blockquote type=\"cite\">"
695 "<div style=\"width: 71ch;\">&gt; <br></div>"
696 "<div style=\"width: 71ch;\">&gt; b</div>"
697 "</blockquote>"
698 HTML_SUFFIX,
699 "On Thu, 2016-09-15 at 08:08 -0400, user wrote:\n"
700 "> \n"
701 "> b"))
702 g_test_fail ();
705 static void
706 test_bug_772513 (TestFixture *fixture)
708 EContentEditor *cnt_editor;
709 gboolean set_signature_from_message, check_if_signature_is_changed, ignore_next_signature_change;
711 test_utils_fixture_change_setting_boolean (fixture, "org.gnome.evolution.mail", "composer-reply-start-bottom", TRUE);
713 if (!test_utils_process_commands (fixture,
714 "mode:plain\n")) {
715 g_test_fail ();
716 return;
719 cnt_editor = test_utils_get_content_editor (fixture);
721 e_content_editor_insert_signature (
722 cnt_editor,
724 FALSE,
725 "none",
726 &set_signature_from_message,
727 &check_if_signature_is_changed,
728 &ignore_next_signature_change);
730 if (!test_utils_run_simple_test (fixture,
732 HTML_PREFIX "<div style=\"width: 71ch;\"><br></div>" HTML_SUFFIX,
733 "\n"))
734 g_test_fail ();
737 static void
738 test_bug_772918 (TestFixture *fixture)
740 if (!test_utils_run_simple_test (fixture,
741 "mode:html\n"
742 "type:a b c d\n"
743 "seq:lll\n"
744 "type:1 2 3 \n"
745 "undo:undo:6\n"
746 "undo:redo:6\n",
747 HTML_PREFIX "<div>a b 1 2 3 c d</div>" HTML_SUFFIX,
748 "a b 1 2 3 c d"))
749 g_test_fail ();
752 static void
753 test_bug_773164 (TestFixture *fixture)
755 test_utils_set_clipboard_text ("This is paragraph 1\n\nThis is paragraph 2\n\nThis is a longer paragraph 3", FALSE);
757 if (!test_utils_run_simple_test (fixture,
758 "mode:plain\n"
759 "undo:save\n"
760 "action:paste\n"
761 "undo:undo\n"
762 "undo:test\n"
763 "undo:redo\n"
764 "seq:huuuue\n" /* Go to the end of the first line */
765 "seq:Sdds\n"
766 "action:cut\n"
767 "seq:dde\n" /* Go to the end of the last line */
768 "action:paste\n"
769 "undo:undo:5\n"
770 "undo:test\n"
771 "undo:redo:5\n",
772 HTML_PREFIX "<div style=\"width: 71ch;\">This is paragraph 1</div>"
773 "<div style=\"width: 71ch;\"><br></div>"
774 "<div style=\"width: 71ch;\">This is a longer paragraph 3</div>"
775 "<div style=\"width: 71ch;\"><br></div>"
776 "<div style=\"width: 71ch;\">This is paragraph 2</div>"
777 HTML_SUFFIX,
778 "This is paragraph 1\n"
779 "\n"
780 "This is a longer paragraph 3\n"
781 "\n"
782 "This is paragraph 2"))
783 g_test_fail ();
786 static void
787 test_bug_775042 (TestFixture *fixture)
789 test_utils_insert_content (fixture,
790 "<body><pre>a\n"
791 "b\n"
793 "<span class=\"-x-evo-to-body\" data-credits=\"On Fri, 2016-11-25 at 08:18 +0000, user wrote:\"></span>"
794 "<span class=\"-x-evo-cite-body\"></span></body>",
795 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
797 if (!test_utils_run_simple_test (fixture,
798 "seq:rl\n"
799 "mode:plain\n",
800 HTML_PREFIX "<div style=\"width: 71ch;\">On Fri, 2016-11-25 at 08:18 +0000, user wrote:</div>"
801 "<blockquote type=\"cite\">"
802 "<pre>&gt; a<br>"
803 "&gt; b<br>"
804 "&gt; c</pre>"
805 "</blockquote>"
806 HTML_SUFFIX,
807 "On Fri, 2016-11-25 at 08:18 +0000, user wrote:\n"
808 "> a\n"
809 "> b\n"
810 "> c"))
811 g_test_fail ();
814 static void
815 test_bug_775691 (TestFixture *fixture)
817 if (!test_utils_run_simple_test (fixture,
818 "mode:plain\n"
819 "type:abc def ghi\\n\n"
820 "seq:urrrrSrrrs\n"
821 "action:copy\n"
822 "seq:d\n"
823 "action:paste\n",
824 HTML_PREFIX "<div style=\"width: 71ch;\">abc def ghi</div>"
825 "<div style=\"width: 71ch;\">def</div>"
826 HTML_SUFFIX,
827 "abc def ghi\n"
828 "def"))
829 g_test_fail ();
832 static void
833 test_bug_779707 (TestFixture *fixture)
835 test_utils_fixture_change_setting_boolean (fixture, "org.gnome.evolution.mail", "composer-reply-start-bottom", TRUE);
836 test_utils_fixture_change_setting_boolean (fixture, "org.gnome.evolution.mail", "composer-wrap-quoted-text-in-replies", FALSE);
838 if (!test_utils_process_commands (fixture,
839 "mode:plain\n")) {
840 g_test_fail ();
841 return;
844 test_utils_insert_content (fixture,
845 "<pre>line 1\n"
846 "line 2\n"
847 "line 3\n"
848 "</pre><span class=\"-x-evo-to-body\" data-credits=\"Credits:\"></span>"
849 "<span class=\"-x-evo-cite-body\"></span>",
850 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
852 if (!test_utils_run_simple_test (fixture,
853 "seq:uuuSesDbnnu\n"
854 "type:a very long text, which splits into multiple lines when this paragraph is not marked as preformatted, but as normal, as it should be\n"
856 HTML_PREFIX "<div style=\"width: 71ch;\">Credits:</div>"
857 "<blockquote type=\"cite\">"
858 "<pre>&gt; line 1</pre>"
859 "</blockquote>"
860 "<div style=\"width: 71ch;\"><br></div>"
861 "<div style=\"width: 71ch;\">a very long text, which splits into multiple lines when this paragraph is not marked as preformatted, but as normal, as it should be</div>"
862 "<div style=\"width: 71ch;\"><br></div>"
863 "<blockquote type=\"cite\">"
864 "<pre>&gt; line 3</pre>"
865 "</blockquote>"
866 "<div style=\"width: 71ch;\"><br></div>"
867 HTML_SUFFIX,
868 "Credits:\n"
869 "> line 1\n"
870 "\n"
871 "a very long text, which splits into multiple lines when this paragraph\n"
872 "is not marked as preformatted, but as normal, as it should be\n"
873 "\n"
874 "> line 3\n"))
875 g_test_fail ();
878 static void
879 test_bug_780275_html (TestFixture *fixture)
881 test_utils_set_clipboard_text ("line 1\nline 2\nline 3", FALSE);
883 if (!test_utils_run_simple_test (fixture,
884 "mode:html\n"
885 "type:line 0\n"
886 "seq:nn\n"
887 "action:paste-quote\n"
888 "undo:save\n" /* 1 */
889 "seq:huuuD\n"
890 "undo:undo\n"
891 "undo:test:1\n"
892 "undo:redo\n"
893 "type:X\n"
894 "seq:ddenn\n"
895 "type:line 4\n"
896 "undo:drop\n"
897 "undo:save\n" /* 1 */
898 "seq:hSuusD\n"
899 "undo:undo\n"
900 "undo:test:1\n"
901 "undo:redo\n"
903 HTML_PREFIX "<div>line 0</div>"
904 "<blockquote type=\"cite\">"
905 "<div>Xline 1</div>"
906 "<div>line 2</div>"
907 "</blockquote>"
908 "<div>line 4</div>"
909 HTML_SUFFIX,
910 "line 0\n"
911 "> Xline 1\n"
912 "> line 2\n"
913 "line 4"))
914 g_test_fail ();
917 static void
918 test_bug_780275_plain (TestFixture *fixture)
920 test_utils_set_clipboard_text ("line 1\nline 2\nline 3", FALSE);
922 if (!test_utils_run_simple_test (fixture,
923 "mode:plain\n"
924 "type:line 0\n"
925 "seq:nn\n"
926 "action:paste-quote\n"
927 "undo:save\n" /* 1 */
928 "seq:huuuD\n"
929 "undo:undo\n"
930 "undo:test:1\n"
931 "undo:redo\n"
932 "type:X\n"
933 "seq:ddenn\n"
934 "type:line 4\n"
935 "undo:drop\n"
936 "undo:save\n" /* 1 */
937 "seq:hSuusD\n"
938 "undo:undo\n"
939 "undo:test:1\n"
940 "undo:redo\n",
941 HTML_PREFIX "<div style=\"width: 71ch;\">line 0</div>"
942 "<blockquote type=\"cite\">"
943 "<div style=\"width: 71ch;\">&gt; Xline 1</div>"
944 "<div style=\"width: 71ch;\">&gt; line 2</div>"
945 "</blockquote>"
946 "<div style=\"width: 71ch;\">line 4</div>"
947 HTML_SUFFIX,
948 "line 0\n"
949 "> Xline 1\n"
950 "> line 2\n"
951 "line 4"))
952 g_test_fail ();
955 static void
956 test_bug_781722 (TestFixture *fixture)
958 if (!test_utils_process_commands (fixture,
959 "mode:plain\n")) {
960 g_test_fail ();
961 return;
964 test_utils_insert_content (fixture,
965 "<pre>Signed-off-by: User &lt;<a href=\"mailto:user@no.where\">user@no.where</a>&gt;\n"
966 "</pre><span class=\"-x-evo-to-body\" data-credits=\"Credits:\"></span>"
967 "<span class=\"-x-evo-cite-body\"></span>",
968 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
970 if (!test_utils_run_simple_test (fixture,
971 "seq:dd\n"
972 "action:style-preformat\n",
973 HTML_PREFIX "<div style=\"width: 71ch;\">Credits:</div>"
974 "<blockquote type=\"cite\">"
975 "<pre>&gt; Signed-off-by: User &lt;<a href=\"mailto:user@no.where\">user@no.where</a>&gt;</pre>"
976 "</blockquote>"
977 HTML_SUFFIX,
978 "Credits:\n"
979 "> Signed-off-by: User <user@no.where>"))
980 g_test_fail ();
983 static void
984 test_bug_781116 (TestFixture *fixture)
986 test_utils_fixture_change_setting_boolean (fixture, "org.gnome.evolution.mail", "composer-wrap-quoted-text-in-replies", FALSE);
988 if (!test_utils_process_commands (fixture,
989 "mode:plain\n")) {
990 g_test_fail ();
991 return;
994 test_utils_insert_content (fixture,
995 "<pre>a very long text, which splits into multiple lines when this paragraph is not marked as preformatted, but as normal, as it should be</pre>\n"
996 "</pre><span class=\"-x-evo-to-body\" data-credits=\"Credits:\"></span>"
997 "<span class=\"-x-evo-cite-body\"></span>",
998 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
1000 if (!test_utils_run_simple_test (fixture,
1001 "seq:dd\n"
1002 "action:wrap-lines\n",
1003 HTML_PREFIX "<div style=\"width: 71ch;\">Credits:</div>"
1004 "<blockquote type=\"cite\">"
1005 "<pre>&gt; a very long text, which splits into multiple lines when this<br>"
1006 "&gt; paragraph is not marked as preformatted, but as normal, as it should<br>"
1007 "&gt; be</pre>"
1008 "</blockquote>"
1009 HTML_SUFFIX,
1010 "Credits:\n"
1011 "> a very long text, which splits into multiple lines when this\n"
1012 "> paragraph is not marked as preformatted, but as normal, as it should\n"
1013 "> be</pre>"))
1014 g_test_fail ();
1017 static void
1018 test_bug_780088 (TestFixture *fixture)
1020 if (!test_utils_process_commands (fixture,
1021 "mode:plain\n")) {
1022 g_test_fail ();
1023 return;
1026 test_utils_set_clipboard_text ("Seeing @blah instead of @foo XX'ed on" UNICODE_NBSP "https://example.sub" UNICODE_NBSP "domain.org/page I'd recommend to XX YY <https://example.subdomain.org/p/user/> , click fjwvne on the left, click skjd sjewncj on the right, and set wqje wjfdn Xs to something like wqjfnm www.example.com/~user wjfdncj or such.", FALSE);
1028 if (!test_utils_run_simple_test (fixture,
1029 "action:paste\n"
1030 "seq:n",
1031 HTML_PREFIX "<div style=\"width: 71ch;\">"
1032 "Seeing @blah instead of @foo XX'ed on&nbsp;<a href=\"https://example.sub\">https://example.sub</a>"
1033 "&nbsp;domain.org/page I'd recommend to XX YY "
1034 "&lt;<a href=\"https://example.subdomain.org/p/user/\">https://example.subdomain.org/p/user/</a>&gt; , "
1035 "click fjwvne on the left, click skjd sjewncj on the right, and set wqje wjfdn Xs to something like "
1036 "wqjfnm <a href=\"www.example.com/~user\">www.example.com/~user</a> wjfdncj or such.</div>"
1037 "</div><div style=\"width: 71ch;\"><br></div>"
1038 HTML_SUFFIX,
1039 "Seeing @blah instead of @foo XX'ed on" UNICODE_NBSP "https://example.sub" UNICODE_NBSP "domain.org/pa\n"
1040 "ge I'd recommend to XX YY <https://example.subdomain.org/p/user/> ,\n"
1041 "click fjwvne on the left, click skjd sjewncj on the right, and set wqje\n"
1042 "wjfdn Xs to something like wqjfnm www.example.com/~user wjfdncj or\n"
1043 "such.\n"))
1044 g_test_fail ();
1047 static void
1048 test_bug_788829 (TestFixture *fixture)
1050 test_utils_fixture_change_setting_boolean (fixture, "org.gnome.evolution.mail", "composer-wrap-quoted-text-in-replies", TRUE);
1051 test_utils_fixture_change_setting_int32 (fixture, "org.gnome.evolution.mail", "composer-word-wrap-length", 71);
1053 if (!test_utils_process_commands (fixture,
1054 "mode:plain\n")) {
1055 g_test_fail ();
1056 return;
1059 test_utils_insert_content (fixture,
1060 "<div>Xxxxx xx xxxxxxxxx xx xxxxxxx xx xxxxx xxxx xxxx xx xxx xxx xxxx xxx xxxçx xôxé "
1061 "\"xxxxx xxxx xxxxxxx xxx\" xx xxxx xxxxé xxx xxx xxxéx xxx x'x xéxxxxé x'xxxxxxxxx xx "
1062 "xxx \"<a href=\"https://gnome.org\">Xxxx XXX Xxxxxx Xxx</a>\". Xx xxxx xxxxxxxx xxx <a"
1063 " href=\"https://gnome.org/\">xxxxxxxxxxxxxxxx.xx</a> (xxxxxxx xxxxxxxxxx xx .xxx). Xxxx "
1064 "êxxx xxx xxxxxxxxxxx xxxéxxxxxxxx, xxxx xxxxx xx XXX xx xéxxx à xx xxx \"xxx xxxxxx xxxx "
1065 "xx xxxxxxx\" xx xxxx xx xxxxx xxxxxxxx xxxxxxxx xx $ xx xxxx x'xxxxxx.</div><div><br>"
1066 "</div><div>Xxxx xx xéxxxxxxx, xxxxxxxx xxxxxxx (!), xxxxxxx à xxx, xxxx ooo$ XXX xxxxé: "
1067 "<a href=\"https://gnome.org\">https://xxxxxxxxxxxxxxxx.xx/xxxxxxx/xxxxx-xxxx-xxxxxxxx-x"
1068 "xxxx-xxxx-xxx-xxxxxxxx-xxx/</a> xx xx xxxx xéxéxxxxxxx x'xxxxxx xxxx xx xxxxxx xx xxxxxx"
1069 "xxxxxx xx xxx (xxxxx Xxxxxx) xxxx xxxx x'xxxxxxx xx xxxxxx: <a href=\"https://gnome.org\">"
1070 "https://xxxxxxxxxxxxxxxx.xxx/xx-xxxxxxx/xxxxxxx/Xxxxxxxxxxxx-Xxxxx-Xxxx-XXX-Xxxxxx-Xxx.xxx"
1071 "</a></div><div><br></div><div>Xxxx xxx xxx xxxxxxx xxxxxxxéxx x'xxxêxxxx à xxxxx, xxx xx x"
1072 "xxxé xx oooxooo xxxxx xxxxx xxxx... xxxx x'xxx xxxxxxxxxxxx xxxxx xxx xxxxxxxx xx \"xx xxx"
1073 "xx xxx xxx xxxxxxx xxxxxxx xxxxxxxxxxxxxx xxxx xxxxx xxxxxx xx xx xxxx xx x'xxxxxx\". Xx "
1074 "xxxx-êxxx xxx xx xxxxxxxx xx xxxx \"x'xxxêxx à xxxxx xx oooxooo xxxx xxx xéxxxxxxxx, xxxx"
1075 "\"...</div><div><br></div><div>Xxxxx xxxxxx'xx xxx x xxxx xxxxxxx xxxxx xx xxèx xxxxxxxxx "
1076 "xxxxxxxxxxxxxxxx à xx xxx x'xx xx xêxx (éxxxxxxxxx xxxx-xx-xxxxxxxx): <a href=\"https://"
1077 "gnome.org\">https://xxxxxxxxxxxxxxxx.xxx/xx-xxxxxxx/xxxxxxx/Xxxxx-xxxx-xxx-xxxxxxxxxx-xx"
1078 "xxx.xxx</a> ;&nbsp;</div><div><br></div><div>...x'x xxxxx xx xxxxxx x'xxxxxx xéxxxxxxx, "
1079 "xx xxx xxxx xxxxxx x'xxxxxxxxxxx xxxxxx, xxxx <a href=\"https://gnome.org\">https://xxxx"
1080 "xxxxxxxxxxxx.xxx/xxxxxxxx-xxxxxxx-xxxx-xxx-o/</a> xxxxx xxx <a href=\"https://gnome.org/\""
1081 ">https://xxxxxxxxxxxxxxxx.xxx/xxxxxxxx-xxxxxxx-xxxx-xxx-o/</a> ...</div>"
1082 "<span class=\"-x-evo-to-body\" data-credits=\"On Today, User wrote:\"></span>"
1083 "<span class=\"-x-evo-cite-body\"></span>",
1084 E_CONTENT_EDITOR_INSERT_REPLACE_ALL | E_CONTENT_EDITOR_INSERT_TEXT_HTML);
1086 if (!test_utils_run_simple_test (fixture,
1088 HTML_PREFIX "<div style=\"width: 71ch;\">On Today, User wrote:</div><blockquote type=\"cite\" "
1089 "style=\"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex\">"
1090 "<div style=\"width: 71ch;\">&gt; Xxxxx xx xxxxxxxxx xx xxxxxxx xx xxxxx xxxx "
1091 "xxxx xx xxx xxx xxxx xxx<br>&gt; xxxçx xôxé \"xxxxx xxxx xxxxxxx xxx\" xx xxxx "
1092 "xxxxé xxx xxx xxxéx xxx<br>&gt; x'x xéxxxxé x'xxxxxxxxx xx xxx \"Xxxx XXX Xxxxxx "
1093 "Xxx\". Xx xxxx<br>&gt; xxxxxxxx xxx xxxxxxxxxxxxxxxx.xx (xxxxxxx xxxxxxxxxx xx .xx"
1094 "x). Xxxx<br>&gt; êxxx xxx xxxxxxxxxxx xxxéxxxxxxxx, xxxx xxxxx xx XXX xx xéxxx à "
1095 "xx<br>&gt; xxx \"xxx xxxxxx xxxx xx xxxxxxx\" xx xxxx xx xxxxx xxxxxxxx xxxxxxxx"
1096 "<br>&gt; xx $ xx xxxx x'xxxxxx.</div><div style=\"width: 71ch;\">&gt; <br></div>"
1097 "<div style=\"width: 71ch;\">&gt; Xxxx xx xéxxxxxxx, xxxxxxxx xxxxxxx (!), "
1098 "xxxxxxx à xxx, xxxx ooo$ XXX<br>&gt; xxxxé: https://xxxxxxxxxxxxxxxx.xx/xxx"
1099 "xxxx/xxxxx-xxxx-xxxxxxxx-xxxxx-<br>&gt; xxxx-xxx-xxxxxxxx-xxx/ xx xx xxxx "
1100 "xéxéxxxxxxx x'xxxxxx xxxx xx xxxxxx<br>&gt; xx xxxxxxxxxxxx xx xxx (xxxxx "
1101 "Xxxxxx) xxxx xxxx x'xxxxxxx xx xxxxxx: <br>&gt; https://xxxxxxxxxxxxxxxx.xx"
1102 "x/xx-xxxxxxx/xxxxxxx/Xxxxxxxxxxxx-Xxxxx-Xx<br>&gt; xx-XXX-Xxxxxx-Xxx.xxx</div>"
1103 "<div style=\"width: 71ch;\">&gt; <br></div><div style=\"width: 71ch;\">&gt; Xx"
1104 "xx xxx xxx xxxxxxx xxxxxxxéxx x'xxxêxxxx à xxxxx, xxx xx xxxxé xx<br>&gt; oooxo"
1105 "oo xxxxx xxxxx xxxx... xxxx x'xxx xxxxxxxxxxxx xxxxx xxx<br>&gt; xxxxxxxx xx \""
1106 "xx xxxxx xxx xxx xxxxxxx xxxxxxx xxxxxxxxxxxxxx xxxx<br>&gt; xxxxx xxxxxx xx xx "
1107 "xxxx xx x'xxxxxx\". Xx xxxx-êxxx xxx xx xxxxxxxx xx<br>&gt; xxxx \"x'xxxêxx à "
1108 "xxxxx xx oooxooo xxxx xxx xéxxxxxxxx, xxxx\"...</div><div style=\"width: 71ch;\">"
1109 "&gt; <br></div><div style=\"width: 71ch;\">&gt; Xxxxx xxxxxx'xx xxx x xxxx xxxxxxx "
1110 "xxxxx xx xxèx xxxxxxxxx<br>&gt; <br>&gt; xxxxxxxxxxxxxxxx à xx xxx x'xx xx xêxx "
1111 "(éxxxxxxxxx xxxx-xx-xxxxxxxx): <a href=\"https://xxxxxxxxxxxxxxxx.xxx/xx-xxxxxxx/"
1112 "xxxxxxx/Xxxxx-xxxx-xxx-xxxxxxxxxx-xxxxx.xxx\">https://xxxxxxxxxxxxxxxx.xxx/xx-xxx"
1113 "xxxx/xxxxxxx/Xxxxx-xxxx-xxx-<br>&gt; xxxxxxxxxx-xxxxx.xxx</a> ;&nbsp;</div><div "
1114 "style=\"width: 71ch;\">&gt; <br></div><div style=\"width: 71ch;\">&gt; ...x'x "
1115 "xxxxx xx xxxxxx x'xxxxxx xéxxxxxxx, xx xxx xxxx xxxxxx<br>&gt; x'xxxxxxxxxxx "
1116 "xxxxxx, xxxx https://xxxxxxxxxxxxxxxx.xxx/xxxxxxxx-xxxx<br>&gt; xxx-xxxx-xxx-o/ "
1117 "xxxxx xxx https://xxxxxxxxxxxxxxxx.xxx/xxxxxxxx-xxxxx<br>&gt; xx-xxxx-xxx-o/ ...</div>" HTML_SUFFIX,
1118 "On Today, User wrote:\n"
1119 "> Xxxxx xx xxxxxxxxx xx xxxxxxx xx xxxxx xxxx xxxx xx xxx xxx xxxx xxx\n"
1120 "> xxxçx xôxé \"xxxxx xxxx xxxxxxx xxx\" xx xxxx xxxxé xxx xxx xxxéx xxx\n"
1121 "> x'x xéxxxxé x'xxxxxxxxx xx xxx \"Xxxx XXX Xxxxxx Xxx\". Xx xxxx\n"
1122 "> xxxxxxxx xxx xxxxxxxxxxxxxxxx.xx (xxxxxxx xxxxxxxxxx xx .xxx). Xxxx\n"
1123 "> êxxx xxx xxxxxxxxxxx xxxéxxxxxxxx, xxxx xxxxx xx XXX xx xéxxx à xx\n"
1124 "> xxx \"xxx xxxxxx xxxx xx xxxxxxx\" xx xxxx xx xxxxx xxxxxxxx xxxxxxxx\n"
1125 "> xx $ xx xxxx x'xxxxxx.\n"
1126 "> \n"
1127 "> Xxxx xx xéxxxxxxx, xxxxxxxx xxxxxxx (!), xxxxxxx à xxx, xxxx ooo$ XXX\n"
1128 "> xxxxé: https://xxxxxxxxxxxxxxxx.xx/xxxxxxx/xxxxx-xxxx-xxxxxxxx-xxxxx-\n"
1129 "> xxxx-xxx-xxxxxxxx-xxx/ xx xx xxxx xéxéxxxxxxx x'xxxxxx xxxx xx xxxxxx\n"
1130 "> xx xxxxxxxxxxxx xx xxx (xxxxx Xxxxxx) xxxx xxxx x'xxxxxxx xx xxxxxx: \n"
1131 "> https://xxxxxxxxxxxxxxxx.xxx/xx-xxxxxxx/xxxxxxx/Xxxxxxxxxxxx-Xxxxx-Xx\n"
1132 "> xx-XXX-Xxxxxx-Xxx.xxx\n"
1133 "> \n"
1134 "> Xxxx xxx xxx xxxxxxx xxxxxxxéxx x'xxxêxxxx à xxxxx, xxx xx xxxxé xx\n"
1135 "> oooxooo xxxxx xxxxx xxxx... xxxx x'xxx xxxxxxxxxxxx xxxxx xxx\n"
1136 "> xxxxxxxx xx \"xx xxxxx xxx xxx xxxxxxx xxxxxxx xxxxxxxxxxxxxx xxxx\n"
1137 "> xxxxx xxxxxx xx xx xxxx xx x'xxxxxx\". Xx xxxx-êxxx xxx xx xxxxxxxx xx\n"
1138 "> xxxx \"x'xxxêxx à xxxxx xx oooxooo xxxx xxx xéxxxxxxxx, xxxx\"...\n"
1139 "> \n"
1140 "> Xxxxx xxxxxx'xx xxx x xxxx xxxxxxx xxxxx xx xxèx xxxxxxxxx\n"
1141 "> \n"
1142 "> xxxxxxxxxxxxxxxx à xx xxx x'xx xx xêxx (éxxxxxxxxx xxxx-xx-xxxxxxxx): https://xxxxxxxxxxxxxxxx.xxx/xx-xxxxxxx/xxxxxxx/Xxxxx-xxxx-xxx-\n"
1143 "> xxxxxxxxxx-xxxxx.xxx ; \n"
1144 "> \n"
1145 "> ...x'x xxxxx xx xxxxxx x'xxxxxx xéxxxxxxx, xx xxx xxxx xxxxxx\n"
1146 "> x'xxxxxxxxxxx xxxxxx, xxxx https://xxxxxxxxxxxxxxxx.xxx/xxxxxxxx-xxxx\n"
1147 "> xxx-xxxx-xxx-o/ xxxxx xxx https://xxxxxxxxxxxxxxxx.xxx/xxxxxxxx-xxxxx\n"
1148 "> xx-xxxx-xxx-o/ ..."))
1149 g_test_fail ();
1152 void
1153 test_add_html_editor_bug_tests (void)
1155 test_utils_add_test ("/bug/726548", test_bug_726548);
1156 test_utils_add_test ("/bug/750657", test_bug_750657);
1157 test_utils_add_test ("/bug/760989", test_bug_760989);
1158 test_utils_add_test ("/bug/767903", test_bug_767903);
1159 test_utils_add_test ("/bug/769708", test_bug_769708);
1160 test_utils_add_test ("/bug/769913", test_bug_769913);
1161 test_utils_add_test ("/bug/769955", test_bug_769955);
1162 test_utils_add_test ("/bug/770073", test_bug_770073);
1163 test_utils_add_test ("/bug/770074", test_bug_770074);
1164 test_utils_add_test ("/bug/771044", test_bug_771044);
1165 test_utils_add_test ("/bug/771131", test_bug_771131);
1166 test_utils_add_test ("/bug/771493", test_bug_771493);
1167 test_utils_add_test ("/bug/772171", test_bug_772171);
1168 test_utils_add_test ("/bug/772513", test_bug_772513);
1169 test_utils_add_test ("/bug/772918", test_bug_772918);
1170 test_utils_add_test ("/bug/773164", test_bug_773164);
1171 test_utils_add_test ("/bug/775042", test_bug_775042);
1172 test_utils_add_test ("/bug/775691", test_bug_775691);
1173 test_utils_add_test ("/bug/779707", test_bug_779707);
1174 test_utils_add_test ("/bug/780275/html", test_bug_780275_html);
1175 test_utils_add_test ("/bug/780275/plain", test_bug_780275_plain);
1176 test_utils_add_test ("/bug/781722", test_bug_781722);
1177 test_utils_add_test ("/bug/781116", test_bug_781116);
1178 test_utils_add_test ("/bug/780088", test_bug_780088);
1179 test_utils_add_test ("/bug/788829", test_bug_788829);