Support rst tables in tool help texts
[alexxy/gromacs.git] / src / gromacs / onlinehelp / tests / helpwritercontext.cpp
index 9db5f0e3403159f08174d5320e5b40a99ef86637..b1daa1697f4a15b80060bded2bad34d78b0ead3a 100644 (file)
@@ -207,4 +207,38 @@ TEST_F(HelpWriterContextTest, FormatsEnumeratedList)
     testFormatting(text);
 }
 
+TEST_F(HelpWriterContextTest, FormatsSimpleTable)
+{
+    const char *const text[] = {
+        "Simple table:",
+        "",
+        "============  =============",
+        "First column  Second header",
+        "============  =============",
+        "text          text",
+        "============  =============",
+        "",
+        "Normal paragraph",
+        "again."
+    };
+    testFormatting(text);
+}
+
+TEST_F(HelpWriterContextTest, FormatsGridTable)
+{
+    const char *const text[] = {
+        "Grid table:",
+        "",
+        "+--------------+---------------+",
+        "| First column | Second header |",
+        "+--------------+---------------+",
+        "| text         | text          |",
+        "+--------------+---------------+",
+        "",
+        "Normal paragraph",
+        "again."
+    };
+    testFormatting(text);
+}
+
 } // namespace