Refactor rst parsing for console output
[alexxy/gromacs.git] / src / gromacs / onlinehelp / tests / helpwritercontext.cpp
index 1b2c4acf681baa786fe16a37d36551feb203c1ac..d41ca87f6b2a9317e3682e81a53970b71ae7aa82 100644 (file)
@@ -168,6 +168,20 @@ TEST_F(HelpWriterContextTest, FormatsLiteralTextAtBeginning)
     testFormatting(text);
 }
 
+TEST_F(HelpWriterContextTest, FormatsLiteralTextWithIndentation)
+{
+    const char *const text[] = {
+        "Sample paragraph::",
+        "",
+        "    literal block",
+        "      another indented line",
+        "",
+        "Normal paragraph",
+        "with wrapping"
+    };
+    testFormatting(text);
+}
+
 TEST_F(HelpWriterContextTest, FormatsBulletList)
 {
     const char *const text[] = {
@@ -243,12 +257,9 @@ TEST_F(HelpWriterContextTest, FormatsGridTable)
 
 TEST_F(HelpWriterContextTest, FormatsTitles)
 {
-    // Console formatting does not currently work without the paragraph breaks
-    // after the title.
     const char *const text[] = {
         "Title",
         "=====",
-        "",
         "Some text without spacing",
         "",
         "Subtitle",