summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src')
-rw-r--r--src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/brief_adventures.qdoc75
-rw-r--r--src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/illformatted-examples.qdoc17
-rw-r--r--src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/some_example.qdoc8
3 files changed, 100 insertions, 0 deletions
diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/brief_adventures.qdoc b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/brief_adventures.qdoc
new file mode 100644
index 000000000..9bad0106b
--- /dev/null
+++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/brief_adventures.qdoc
@@ -0,0 +1,75 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \page brief-adventures.html
+ \title Adventures with QDoc's \\brief command
+ \brief Test that the \\brief command doesn't eat content that follows it.
+ \inmodule sometestgroup
+ \keyword some_keyword
+
+ The purpose of this test data is to provide a regression mechanism as part
+ of QDoc's end-to-end test, tst_generatedOutput, for an issue (QTBUG-70959)
+ that was reported against QDoc's \\keyword command. The issue, as
+ experienced by the reporter of the bug, is that if the \\keyword command
+ isn't followed by a new command, or is the last command in a paragraph,
+ the following paragraph is "eaten". That means the entire paragraph is
+ understood by QDoc as keywords and included as html meta information
+ instead of as part of the rendered output.
+
+ \section1 Further details
+ The bug report is at \l https://bugreports.qt.io/browse/QTBUG-70959.
+ It refers to a change that bypassed the issue by moving the \\keyword
+ command, at \l https://codereview.qt-project.org/c/qt/qtdoc/+/242033/.
+*/
+
+/*!
+ \page page-with-an-image-at-the-top.html
+ \title This page starts with an image
+ \brief This page has an image right at the top.
+ \image leonardo-da-vinci.png This is the alternate text for the image
+ The image should render as expected, and the alternate text should be
+ there, too. This text is contained in its own paragraph following the
+ image.
+
+ This paragraph is a new paragraph, and doesn't contain an image.
+*/
+
+/*!
+ \page page-with-comment-after-brief.html
+ \title Yet another adventure with QDoc's \\brief command
+ \brief Another test that the \\brief command doesn't eat content that follows it.
+ //! This QDoc comment might cause an issue, let's try it!
+
+ This paragraph should render normally, but might be eaten by the \\brief
+ brief because the brief is followed by a QDoc comment (which shouldn't be
+ rendered at all).
+*/
+
+/*!
+ \page page-with-comment-in-brief.html
+ \title Yet, yet another adventure with QDoc's \\brief command
+ \brief Another test that the \\brief command //! Brief continues below
+ isn't entirely broken.
+
+ The brief for this page is:
+ "Another test that the \\brief command isn't entirely broken."
+*/
+
+/*!
+ \page another-page-with-comments-in-the-brief
+ \title There's no end to the possibilities!
+ \brief Another test that the \\brief command //! Doesn't contain a full stop.
+ //! QDoc's CMD_BRIEF should issue a warning when it doesn't end with a full
+ //! stop. However, if a \\brief is followed by a line comment (i.e. `//!`),
+ //! the warning isn't issued. This is tied to how `CMD_BRIEF` performs
+ //! macro expansion and command processing; in the case of line comments in
+ //! the argument, the last character of the brief's atom isn't a full stop.
+ isn't completely borked
+
+ The brief for this page is:
+ "Another test that the \\brief command isn't completely borked". Notice the
+ lack of a trailing full stop in the brief. QDoc should generate a warning
+ about that when generating HTML.
+
+*/
diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/illformatted-examples.qdoc b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/illformatted-examples.qdoc
new file mode 100644
index 000000000..5bfa9e7f6
--- /dev/null
+++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/illformatted-examples.qdoc
@@ -0,0 +1,17 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \page illformatted-examples.html
+ \ingroup all-examples
+ \title Test generated output for illformatted examples
+ \brief Demonstrate correctness for example generation.
+
+ This test includes the following examples:
+
+ \section1 QML Examples
+ \annotatedlist illformatted-examples-qml
+
+ \section1 C++ Examples
+ \annotatedlist illformatted-examples-cpp
+*/
diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/some_example.qdoc b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/some_example.qdoc
new file mode 100644
index 000000000..a64605b87
--- /dev/null
+++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/illformatted_documentation/src/some_example.qdoc
@@ -0,0 +1,8 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example someexample
+ \title QDoc: some example
+ \ingroup illformatted-examples-qml
+*/