diff --git a/tests/src/com/fsck/k9/helper/HtmlConverterTest.java b/tests/src/com/fsck/k9/helper/HtmlConverterTest.java
index f18844480..da9ccab32 100644
--- a/tests/src/com/fsck/k9/helper/HtmlConverterTest.java
+++ b/tests/src/com/fsck/k9/helper/HtmlConverterTest.java
@@ -30,18 +30,18 @@ public class HtmlConverterTest extends TestCase {
+ "
"
+ "Bob Barker <bob@aol.com> wrote:
"
+ "
" - + "a canal" + + " Too easy!" + "
" + + " a canal
" + "
" - + "Dorothy Jo Gideon <dorothy@aol.com> espoused:
" + + " Dorothy Jo Gideon <dorothy@aol.com> espoused:
" + "" + "A man, a plan..." - + "Too easy!
" + "
" + "" + "", result); @@ -63,11 +63,11 @@ public class HtmlConverterTest extends TestCase { + "" - + "Guess!" + + " Guess!" + "" + "
" - + "A wise man once said...", result); } @@ -95,17 +95,17 @@ public class HtmlConverterTest extends TestCase { assertEquals("
" + + " A wise man once said...
" + "
" - + "LOL F1RST!!!!!
" + + " LOL F1RST!!!!!
" + "
" - + ":)" + + " :)" + "
" + "zero
" + "" - + "one
" + + " one
" + "" - + "two
" + + " two
" + "" - + "three
" + + " three
" + "" - + "four" @@ -133,4 +133,19 @@ public class HtmlConverterTest extends TestCase { e.printStackTrace(); } } + + public void testPreserveSpacesAtFirst() { + String message = "foo\n" + + " bar\n" + + " baz\n" + + "\n"; + String result = HtmlConverter.textToHtml(message); + writeToFile(result); + assertEquals("
" + + " four
" + "" - + "five" + "
" + + " five
" + "" - + "six" + + " six" + "" + "" + + "foo", result); + } }
" + + " bar
" + + " baz
" + + "
" + + "