!!! 5
%html{lang: :en, prefix: "mf: http://www.w3.org/2001/sw/DataAccess/tests/test-manifest# rdft: http://www.w3.org/ns/rdftest#"}
  %head
    %meta{"http-equiv" => "Content-Type", content: "text/html;charset=utf-8"}
    %meta{name: "viewport", content: "width=device-width, initial-scale=1.0"}
    %link{rel: "stylesheet", type: "text/css", href: "https://www.w3.org/StyleSheets/TR/base"}
    :css
      body {background-image: none;}
      dl.editor>dd {
        margin: 0 0 0 40px;
      }
      dl.test-detail {
        padding: 0.5em;
      }
      dl.test-detail>dt {
        float: left;
        clear: left;
        text-align: right;
        font-weight: bold;
        color: green;
      }
      dl.test-detail>dt:after {content: ": "}
      dl.test-detail>dd {
        margin: 0 0 0 210px;
        padding: 0 0 0.5em 0;
      }
      dl.test-description>dt {margin-top: 2em;}
      dd {margin-left: 0;}
      dd code {display: inline;}
      footer {text-align: center;}
    %title
      = man['label']
    :css
      em.rfc2119 { 
        text-transform: lowercase;
        font-variant:   small-caps;
        font-style:     normal;
        color:          #900;
      }
      a.testlink {
        color: inherit;
        text-decoration: none;
      }
      a.testlink:hover {
        text-decoration: underline;
      }
      .warning {color: orange;}
      .error {color: red;}

  %body{resource: man['@id'], typeof: man['@type']}
    %p
      %a{href: "http://www.w3.org/"}
        %img{src: "http://www.w3.org/Icons/w3c_home", alt: "W3C", height: 48, width: 72}
    %h1{property: "rdfs:label"}<= man['label']
    :markdown
      [Copyright](http://www.w3.org/Consortium/Legal/ipr-notice#Copyright) © 2004-2023 [World Wide Web Consortium](https://www.w3.org/). <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> [liability](https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer), [trademark](https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks) and [permissive document license](https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document) rules apply.
    %hr{title: "Separator for header"}

    %div
      %h2{id: "abstract"}="Abstract"
      %p{property: "rdfs:comment"}
        = Array(man['comment']).join(' ').gsub(/\s+/m, ' ').strip.gsub(/(MUST|SHOULD|MAY)/, '<em class="rfc2119">\\1</em>')
      :markdown
        This page describes W3C RDF 1.1 Working Group's Entailment test suite. This test suite contains two kinds of tests:

        * Positive Entailment Tests (`rdft:PositiveEntailmentTest`)
        * Positive Entailment Tests (rdft:NegativeEntailmentTest)

        These tests are also described in [Turtle](manifest.ttl) format in this directory for convenience. The manifest files in this directory lists all of the approved tests in the RDF WG's RDF Entailment test suite. All tests have a name (`mf:name`) and an input (`mf:action`).

        Each test is one of the above kinds of tests. All tests have

        * a name (`mf:name`),
        * an input RDF graph URL (`mf:action`),
        * an output RDF graph URL or the special marker false (`mf:result`),
        * an entailment regime, which is "simple", "RDF", or "RDFS" (`mf:entailmentRegime`),
        * a list of recognized datatypes (`mf:recognizedDatatypes`),
        * a list of unrecognized datatypes (`mf:unrecognizedDatatypes`).

        An implementation passes a Positive (Negative) Entailment Test if, when
        configured to 
        1. perform entailment under the entailment regime of the test or some
           entailment regime that is stronger (weaker) than the entailment regime and
        2. recognize all the datatypes in the list of recognized datatypes and
           none of the datatypes in the list of unrecognized datatypes,
          * for tests that have an output graph, determines that the input RDF graph entails (does not entail) the output RDF graph
          * for tests that have false as output, either determines that the input
            RDF graph entails (does not entail) an inconsistent RDF graph or that the input RDF graph is inconsistent (consistent).

        An implementation also passes a test if when configured differently from a
        correct configuration as given above nonetheless produces the given result, and the result is correct in the configured entailment regime with the configured recognized datatypes.

        Tests can be run from the web or by downloading either a [tarball](TESTS.tar.gz) or [zip file](TESTS.zip).

        The home of the test suite is <http://www.w3.org/2013/rdf-mt-tests/>.

        See <http://www.w3.org/2011/rdf-wg/wiki/RDF_Test_Suites> for more details. Per RFC 3986 section 5.1.3, the base IRI for parsing each file is the retrieval IRI for that file, but changing base IRIs should not affect any testing results.

      %h3#contributing-tests="Contributing Tests"
      :markdown
        The test manifests and entries are built automatically from [manifest.ttl](manifest.ttl) using a Rake task. Tests may be contributed via pull request to [https://github.com/w3c/rdf-tests](https://github.com/w3c/rdf-tests) with suitable changes to the [manifest.ttl](manifest.ttl) and referenced files.

      %h3#distribution="Distribution"
      :markdown
        Distributed under both the [W3C Test Suite License](http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) and the [W3C 3-clause BSD License](http://www.w3.org/Consortium/Legal/2008/03-bsd-license). To contribute to a W3C Test Suite, see the [policies and contribution forms](http://www.w3.org/2004/10/27-testcases).

      %h3#disclaimer="Disclaimer"
      :markdown
        UNDER BOTH MUTUALLY EXCLUSIVE LICENSES, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
        COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

    %div
      %h2
        Test Descriptions
      %dl.test-description
        - man['entries'].each do |test|
          - test_id = test['@id'].split('#').last
          %dt{id: test_id}
            %a.testlink{href: "##{test_id}"}
              = "#{test_id}:"
            %span{about: test['@id'], property: "mf:name"}<~test['name']
          %dd{property: "mf:entry", inlist: true, resource: test['@id'], typeof: test['@type']}
            %div{property: "rdfs:comment"}
              :markdown
                #{Array(test['comment']).join(' ').gsub(/\s+/m, ' ').strip.gsub(/(MUST|SHOULD|MAY)/, '<em class="rfc2119">\\1</em>')}
              - if test['type'] =~ /Negative/
                %p.error
                  Negative Test
            %dl.test-detail
              %dt="type"
              %dd<~test['@type']
              %dt="approval"
              %dd{property: "mf:approval", resource: test['approval']}<~test['approval']
              %dt="entailmentRegime"
              %dd{property: "mf:entailmentRegime"}<~test['entailmentRegime']
              %dt="recognizedDatatypes"
              %dd
                - if Array(test['recognizedDatatypes']).empty?
                  %code{property: "mf:recognizedDatatypes", resource: "rdf:nil"}="none"
                - else
                  - Array(test['recognizedDatatypes']).each do |dt|
                    %code{property: "mf:recognizedDatatypes", resource: dt, inlist: true}<~dt
              %dt="unrecognizedDatatypes"
              %dd
                - if Array(test['unrecognizedDatatypes']).empty?
                  %code{property: "mf:unrecognizedDatatypes", resource: "rdf:nil"}="none"
                - else
                  - Array(test['unrecognizedDatatypes']).each do |dt|
                    %code{property: "mf:unrecognizedDatatypes", resource: dt, inlist: true}<~dt

              - # Spec references
              - if test_map[test_id]
                %dt="references"
                %dd
                  - links = test_map[test_id].map.with_index {|l, r| %(<a href="#{l}">#{r+1}</a>)}
                  != "(#{links.join(' ')})"

              - if test['action']
                %dt="action"
                %dd
                  %a{property: "mf:action", href: test['action']}<~test['action']
              - if test['result']
                %dt="result"
                %dd
                  - if test['result'].eql?(true)
                    %code{property: "mf:result", datatype: "xsd:boolean"}<~test['result']
                  - elsif test['result'].eql?(false)
                    %code{property: "mf:result", datatype: "xsd:boolean"}<~test['result']
                  - else
                    %a{property: "mf:result", href: test['result']}<~test['result']

    %footer
      :markdown
        [Copyright](http://www.w3.org/Consortium/Legal/ipr-notice#Copyright) © 2004-2023 [World Wide Web Consortium](https://www.w3.org/). <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> [liability](https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer), [trademark](https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks) and [permissive document license](https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document) rules apply.
