diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/tools/boostbook/xsl/testing/testsuite.xsl | |
parent | Initial commit. (diff) | |
download | ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/tools/boostbook/xsl/testing/testsuite.xsl')
-rw-r--r-- | src/boost/tools/boostbook/xsl/testing/testsuite.xsl | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/src/boost/tools/boostbook/xsl/testing/testsuite.xsl b/src/boost/tools/boostbook/xsl/testing/testsuite.xsl new file mode 100644 index 000000000..b12eef667 --- /dev/null +++ b/src/boost/tools/boostbook/xsl/testing/testsuite.xsl @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com> + + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) + --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:template match="testsuite"> + <section> + <xsl:choose> + <xsl:when test="@id"> + <xsl:attribute name="id"> + <xsl:value-of select="@id"/> + </xsl:attribute> + </xsl:when> + <xsl:when test="../@id"> + <xsl:attribute name="id"> + <xsl:value-of select="concat(../@id, '.tests')"/> + </xsl:attribute> + </xsl:when> + </xsl:choose> + + <title>Testsuite</title> + + <xsl:if test="compile-test|link-test|run-test"> + <section> + <xsl:if test="@id"> + <xsl:attribute name="id"> + <xsl:value-of select="@id"/> + <xsl:text>.acceptance</xsl:text> + </xsl:attribute> + </xsl:if> + + <title>Acceptance tests</title> + <informaltable> + <tgroup cols="3"> + <colspec colnum="2" colwidth="1in"/> + <thead> + <row> + <entry>Test</entry> + <entry>Type</entry> + <entry>Description</entry> + <entry>If failing...</entry> + </row> + </thead> + <tbody> + <xsl:apply-templates select="compile-test|link-test|run-test"/> + </tbody> + </tgroup> + </informaltable> + </section> + </xsl:if> + + <xsl:if test="compile-fail-test|link-fail-test|run-fail-test"> + <section> + <xsl:if test="@id"> + <xsl:attribute name="id"> + <xsl:value-of select="@id"/> + <xsl:text>.negative</xsl:text> + </xsl:attribute> + </xsl:if> + <title>Negative tests</title> + <informaltable> + <tgroup cols="3"> + <colspec colnum="2" colwidth="1in"/> + <thead> + <row> + <entry>Test</entry> + <entry>Type</entry> + <entry>Description</entry> + <entry>If failing...</entry> + </row> + </thead> + <tbody> + <xsl:apply-templates + select="compile-fail-test|link-fail-test|run-fail-test"/> + </tbody> + </tgroup> + </informaltable> + </section> + </xsl:if> + </section> + </xsl:template> + + <xsl:template match="compile-test|link-test|run-test| + compile-fail-test|link-fail-test|run-fail-test"> + <row> + <entry> + <simpara> + <ulink> + <xsl:attribute name="url"> + <xsl:value-of + select="concat('../../libs/', + ancestor::library/attribute::dirname, '/test/', + @filename)"/> + </xsl:attribute> + <xsl:value-of select="@filename"/> + </ulink> + </simpara> + </entry> + <entry> + <simpara> + <xsl:value-of select="substring-before(local-name(.), '-test')"/> + </simpara> + </entry> + <entry><xsl:apply-templates select="purpose/*"/></entry> + <entry><xsl:apply-templates select="if-fails/*"/></entry> + </row> + </xsl:template> + + <xsl:template match="snippet"> + <xsl:variable name="snippet-name" select="@name"/> + <xsl:apply-templates select="//programlisting[@name=$snippet-name]"/> + </xsl:template> +</xsl:stylesheet> |