diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md | 52 | ||||
-rw-r--r-- | tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp | 3 |
2 files changed, 40 insertions, 15 deletions
diff --git a/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md b/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md index 44c198fdc5..6336d0219f 100644 --- a/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md +++ b/tests/auto/gui/text/qtextmarkdownwriter/data/blockquotes.md @@ -20,21 +20,43 @@ MacFarlane writes: > equivalent sample of Markdown. Here is a sample of AsciiDoc from the AsciiDoc > manual: -> 1. List item one. -> + -> List item one continued with a second paragraph followed by an -> Indented block. -> + -> ................. -> $ ls *.sh -> $ mv *.sh ~/tmp -> ................. -> + -> List item continued with a third paragraph. -> -> 2. List item two continued with an open block. -> ... -> +> ``` AsciiDoc +> 1. List item one. +> + +> List item one continued with a second paragraph followed by an +> Indented block. +> + +> ................. +> $ ls *.sh +> $ mv *.sh ~/tmp +> ................. +> + +> List item continued with a third paragraph. +> +> 2. List item two continued with an open block. +> ... +> ``` The quotation includes an embedded quotation and a code quotation and ends with an ellipsis due to being incomplete. +Now let's have an indented code block: + + #include <stdio.h> + + int main(void) + { + printf("# hello markdown\n"); + return 0; + } + +and end with a fenced code block: +~~~ pseudocode +#include <something.h> +#include <else.h> + +a block { + a statement; + another statement; +} +~~~ + diff --git a/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp b/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp index 1935e58dec..8d38cbb18a 100644 --- a/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp +++ b/tests/auto/gui/text/qtextmarkdownwriter/tst_qtextmarkdownwriter.cpp @@ -419,6 +419,9 @@ void tst_QTextMarkdownWriter::fromHtml_data() QTest::newRow("image") << "<img src=\"/url\" alt=\"foo\" title=\"title\"/>" << "![foo](/url \"title\")\n\n"; + QTest::newRow("code") << + "<pre class=\"language-pseudocode\">\n#include \"foo.h\"\n\nblock {\n statement();\n}\n\n</pre>" << + "``` pseudocode\n#include \"foo.h\"\n\nblock {\n statement();\n}\n```\n\n"; // TODO // QTest::newRow("escaped number and paren after double newline") << // "<p>(The first sentence of this paragraph is a line, the next paragraph has a number</p>13) but that's not part of an ordered list" << |