mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Wrap expected long strings
This commit is contained in:
parent
620f56ceff
commit
ba33ef232e
@ -25,7 +25,26 @@ public class HtmlConverterTest extends TestCase {
|
|||||||
">> Guess!";
|
">> Guess!";
|
||||||
String result = HtmlConverter.textToHtml(message);
|
String result = HtmlConverter.textToHtml(message);
|
||||||
writeToFile(result);
|
writeToFile(result);
|
||||||
assertEquals("<pre class=\"k9mail\">Panama!<br /><br />Bob Barker <bob@aol.com> wrote:<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">a canal<br /><br />Dorothy Jo Gideon <dorothy@aol.com> espoused:<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">A man, a plan...<br /></blockquote>Too easy!</blockquote><br />Nice job :)<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\"><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">Guess!</blockquote></blockquote></pre>", result);
|
assertEquals("<pre class=\"k9mail\">"
|
||||||
|
+ "Panama!<br />"
|
||||||
|
+ "<br />"
|
||||||
|
+ "Bob Barker <bob@aol.com> wrote:<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">"
|
||||||
|
+ "a canal<br />"
|
||||||
|
+ "<br />"
|
||||||
|
+ "Dorothy Jo Gideon <dorothy@aol.com> espoused:<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">"
|
||||||
|
+ "A man, a plan...<br />"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "Too easy!</blockquote>"
|
||||||
|
+ "<br />"
|
||||||
|
+ "Nice job :)<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">"
|
||||||
|
+ "Guess!"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</pre>", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTextQuoteToHtmlBlockquoteIndented() {
|
public void testTextQuoteToHtmlBlockquoteIndented() {
|
||||||
@ -39,7 +58,18 @@ public class HtmlConverterTest extends TestCase {
|
|||||||
"> :)";
|
"> :)";
|
||||||
String result = HtmlConverter.textToHtml(message);
|
String result = HtmlConverter.textToHtml(message);
|
||||||
writeToFile(result);
|
writeToFile(result);
|
||||||
assertEquals("<pre class=\"k9mail\">*facepalm*<br /><br />Bob Barker <bob@aol.com> wrote:<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">A wise man once said...<br /><br />LOL F1RST!!!!!<br /><br />:)</blockquote></pre>", result);
|
assertEquals("<pre class=\"k9mail\">"
|
||||||
|
+ "*facepalm*<br />"
|
||||||
|
+ "<br />"
|
||||||
|
+ "Bob Barker <bob@aol.com> wrote:<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">"
|
||||||
|
+ "A wise man once said...<br />"
|
||||||
|
+ "<br />"
|
||||||
|
+ "LOL F1RST!!!!!<br />"
|
||||||
|
+ "<br />"
|
||||||
|
+ ":)"
|
||||||
|
+ "</blockquote></pre>", result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testQuoteDepthColor() {
|
public void testQuoteDepthColor() {
|
||||||
@ -62,7 +92,27 @@ public class HtmlConverterTest extends TestCase {
|
|||||||
">>>>>> six";
|
">>>>>> six";
|
||||||
String result = HtmlConverter.textToHtml(message);
|
String result = HtmlConverter.textToHtml(message);
|
||||||
writeToFile(result);
|
writeToFile(result);
|
||||||
assertEquals("<pre class=\"k9mail\">zero<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">one<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">two<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;\">three<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;\">four<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;\">five<br /><blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;\">six</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></pre>", result);
|
assertEquals("<pre class=\"k9mail\">"
|
||||||
|
+ "zero<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;\">"
|
||||||
|
+ "one<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;\">"
|
||||||
|
+ "two<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;\">"
|
||||||
|
+ "three<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;\">"
|
||||||
|
+ "four<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;\">"
|
||||||
|
+ "five<br />"
|
||||||
|
+ "<blockquote class=\"gmail_quote\" style=\"margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;\">"
|
||||||
|
+ "six"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</blockquote>"
|
||||||
|
+ "</pre>", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeToFile(final String content) {
|
private void writeToFile(final String content) {
|
||||||
|
Loading…
Reference in New Issue
Block a user