diff options
Diffstat (limited to 'src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors')
7 files changed, 162 insertions, 0 deletions
diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/duplicate_section_titles_have_unique_anchors.qdocconf b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/duplicate_section_titles_have_unique_anchors.qdocconf new file mode 100644 index 000000000..d1ebe89d0 --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/duplicate_section_titles_have_unique_anchors.qdocconf @@ -0,0 +1,25 @@ +project = Duplicate section titles have unique anchors + +locationinfo = false + +headers.fileextensions = "*.h *.hpp" +sources.fileextensions = "*.cpp *.qml *.qdoc" + +headerdirs = . +sourcedirs = ./src + +warninglimit = 0 +warninglimit.enabled = true + +outputformats = WebXML HTML DocBook +WebXML.quotinginformation = true + +HTML.nosubdirs = true +HTML.outputsubdir = html + +WebXML.nosubdirs = true +WebXML.outputsubdir = webxml + +DocBook.nosubdirs = true +DocBook.outputsubdir = docbook + diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/docbook/page-one.xml b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/docbook/page-one.xml new file mode 100644 index 000000000..350130f15 --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/docbook/page-one.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en"> +<db:info> +<db:title>Page One</db:title> +<db:productname>Duplicate section titles have unique anchors</db:productname> +<db:titleabbrev>Duplicate section titles have unique anchors Reference Documentation</db:titleabbrev> +<db:abstract> +<db:para>Duplicate section titles have unique anchors Reference Documentation.</db:para></db:abstract> +</db:info> +<db:para>This test is for a documentation project with multiple section titles whose names collide.</db:para> +<db:section xml:id="section-one"> +<db:title>Section One</db:title> +<db:para>This is the first section.</db:para> +<db:section xml:id="section-two"> +<db:title>Section Two</db:title> +<db:para>This is the first sub-section.</db:para> +</db:section> +</db:section> +<db:section xml:id="section-one-2"> +<db:title>Section One</db:title> +<db:para>This is the second section.</db:para> +<db:section xml:id="section-one-2-section-two-3"> +<db:title>Section Two</db:title> +<db:para>This is the second sub-section.</db:para> +</db:section> +</db:section> +</db:article> diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/html/duplicate-section-titles-have-unique-anchors.index b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/html/duplicate-section-titles-have-unique-anchors.index new file mode 100644 index 000000000..3f5d2a9af --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/html/duplicate-section-titles-have-unique-anchors.index @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE QDOCINDEX> +<INDEX url="" title="Duplicate section titles have unique anchors Reference Documentation" version="" project="Duplicate section titles have unique anchors"> + <namespace name="" status="active" access="public" module="duplicate section titles have unique anchors"> + <page name="page_one.html" href="page-one.html" status="active" location="page_one.qdoc" documented="true" subtype="page" title="Page One" fulltitle="Page One" subtitle=""> + <contents name="section-one" title="Section One" level="1"/> + <contents name="section-two" title="Section Two" level="2"/> + <contents name="section-one-2" title="Section One" level="1"/> + <contents name="section-one-2-section-two-3" title="Section Two" level="2"/> + </page> + </namespace> +</INDEX> diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/html/page-one.html b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/html/page-one.html new file mode 100644 index 000000000..5f6501bfa --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/html/page-one.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> +<!-- page_one.qdoc --> + <title>Page One | Duplicate section titles have unique anchors</title> +</head> +<body> +<div class="sidebar"> +<div class="toc"> +<h3 id="toc">Contents</h3> +<ul> +<li class="level1"><a href="#section-one">Section One</a></li> +<li class="level2"><a href="#section-two">Section Two</a></li> +<li class="level1"><a href="#section-one-2">Section One</a></li> +<li class="level2"><a href="#section-one-2-section-two-3">Section Two</a></li> +</ul> +</div> +<div class="sidebar-content" id="sidebar-content"></div></div> +<h1 class="title">Page One</h1> +<!-- $$$page_one.html-description --> +<div class="descr" id="details"> +<p>This test is for a documentation project with multiple section titles whose names collide.</p> +<h2 id="section-one">Section One</h2> +<p>This is the first section.</p> +<h3 id="section-two">Section Two</h3> +<p>This is the first sub-section.</p> +<h2 id="section-one-2">Section One</h2> +<p>This is the second section.</p> +<h3 id="section-one-2-section-two-3">Section Two</h3> +<p>This is the second sub-section.</p> +</div> +<!-- @@@page_one.html --> +</body> +</html> diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/webxml/duplicate-section-titles-have-unique-anchors.index b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/webxml/duplicate-section-titles-have-unique-anchors.index new file mode 100644 index 000000000..3f5d2a9af --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/webxml/duplicate-section-titles-have-unique-anchors.index @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE QDOCINDEX> +<INDEX url="" title="Duplicate section titles have unique anchors Reference Documentation" version="" project="Duplicate section titles have unique anchors"> + <namespace name="" status="active" access="public" module="duplicate section titles have unique anchors"> + <page name="page_one.html" href="page-one.html" status="active" location="page_one.qdoc" documented="true" subtype="page" title="Page One" fulltitle="Page One" subtitle=""> + <contents name="section-one" title="Section One" level="1"/> + <contents name="section-two" title="Section Two" level="2"/> + <contents name="section-one-2" title="Section One" level="1"/> + <contents name="section-one-2-section-two-3" title="Section Two" level="2"/> + </page> + </namespace> +</INDEX> diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/webxml/page-one.webxml b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/webxml/page-one.webxml new file mode 100644 index 000000000..98c92b784 --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/expected/webxml/page-one.webxml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<WebXML> + <document> + <page name="page_one.html" href="page-one.html" status="active" location="page_one.qdoc" documented="true" subtype="page" title="Page One" fulltitle="Page One" subtitle=""> + <contents name="section-one" title="Section One" level="1"/> + <contents name="section-two" title="Section Two" level="2"/> + <contents name="section-one-2" title="Section One" level="1"/> + <contents name="section-one-2-section-two-3" title="Section Two" level="2"/> + <description> + <para>This test is for a documentation project with multiple section titles whose names collide.</para> + <section id="section-one"> + <heading level="1">Section One</heading> + <para>This is the first section.</para> + </section> + <section id="section-two"> + <heading level="2">Section Two</heading> + <para>This is the first sub-section.</para> + </section> + <section id="section-one"> + <heading level="1">Section One</heading> + <para>This is the second section.</para> + </section> + <section id="section-two"> + <heading level="2">Section Two</heading> + <para>This is the second sub-section.</para> + </section> + </description> + </page> + </document> +</WebXML> diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/src/page_one.qdoc b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/src/page_one.qdoc new file mode 100644 index 000000000..4596ffccd --- /dev/null +++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/duplicate_section_titles_have_unique_anchors/src/page_one.qdoc @@ -0,0 +1,21 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \page page_one.html + \title Page One + + This test is for a documentation project with multiple section titles whose names collide. + + \section1 Section One + This is the first section. + + \section2 Section Two + This is the first sub-section. + + \section1 Section One + This is the second section. + + \section2 Section Two + This is the second sub-section. +*/ |