<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent" [
  <!ENTITY enforcetests SYSTEM "precis-test-vectors/enforcetests.xml">
  <!ENTITY comparetests SYSTEM "precis-test-vectors/comparetests.xml">
  <!ENTITY docName "draft-whited-precis-test-vectors-03">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     ipr="trust200902"
     consensus="true"
     docName="&docName;"
     obsoletes=""
     updates=""
     category="std"
     submissionType="IETF"
     xml:lang="en"
     sortRefs="true"
     symRefs="true"
     tocInclude="true"
     tocDepth="4"
     version="3">
  <!-- xml2rfc v2v3 conversion 2.39.0 -->
  <front>
    <title abbrev="PRECIS: Tests">Preparation, Enforcement, and Comparison of Internationalized Strings (PRECIS) Test Vectors</title>
    <seriesInfo
      name="Internet-Draft"
      value="&docName;"/>
    <seriesInfo
      name=""
      status="standard"
      value="&docName;"/>
    <author initials="S." surname="Whited" fullname="Sam Whited">
      <organization/>
      <address>
        <postal>
          <street/>
          <city>Atlanta</city>
          <code>GA</code>
          <country>USA</country>
          <region/>
        </postal>
        <phone/>
        <email>sam@samwhited.com</email>
        <uri>https://blog.samwhited.com/</uri>
      </address>
    </author>
    <date year="2020" month="April" day="25"/>
    <area>Applications</area>
    <workgroup>PRECIS</workgroup>
    <keyword>tests</keyword>
    <keyword>unicode</keyword>
    <abstract>
      <t>
        This document contains test vectors for several Preparation,
        Enforcement, and Comparison of Internationalized Strings (PRECIS)
        profiles.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <section anchor="overview" numbered="true" toc="default">
        <name>Overview</name>
        <t>
        This document contains test vectors for several Preparation,
        Enforcement, and Comparison of Internationalized Strings (PRECIS) <xref
        target="RFC8264" format="default"/> profiles.
        </t>
        <t>
        Two sets of vectors exist for profiles of the base classes.
        The first set tests the enforcement step.
        It takes the form of a table that contains an input string, an output
        string and an optional error.
        If the error column has a value of "ctx" it indicates that the context
        rule was violated, "empty" means that an empty string was disallowed,
        "rune" means that a disallowed code point (rune) was encountered, and
        "bidi" indicates that the BIDI Rule was violated.
        The second set tests the PRECIS comparison step.
        It takes the form of a table that contains two strings, a boolean that
        is TRUE if the two strings should be considered equal and FALSE
        otherwise, and an optional comment.
        </t>
        <t>
        Vectors for inclusion of code points in the IdentifierClass and
        FreeformClass are not included.
        A complete list of valid inputs and Outputs for the derived property
        algorithm specified in <xref target="RFC8264" format="default"/> can be
        found in the <xref target="IANA.PRECIS.derived.property.value">IANA
        "PRECIS Derived Property Value" registry</xref>.
        </t>
      </section>
      <section anchor="terms" numbered="true" toc="default">
        <name>Terminology</name>
        <t>
        Many important terms used in this document are defined in
        <xref target="RFC8264" format="default"/>, <xref target="RFC6365" format="default"/>, and
        <xref target="Unicode" format="default"/>.
        </t>
      </section>
    </section>
    <section anchor="vectors" numbered="true" toc="default">
      <name>Test Vectors</name>
      <section anchor="method" numbered="true" toc="default">
        <name>Methodology</name>
        <t>
        The test vectors in this document have been verified by three
        independent implementations.
        An implementation that concurs with the results provided in this
        document should be interoperable with other implementations.
        </t>
        <t>
        Input and output strings are expressed as UTF-8 and hexidecimal encoded
        byte strings.
        </t>
        &enforcetests;
        &comparetests;
      </section>
    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
      This document requires no interaction with the Internet Assigned Numbers
      Authority (IANA).
      </t>
    </section>
    <section anchor="security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
      This document is intended to provide test vectors for the PRECIS framework
      and its profiles.
      No assertion of the security of the PRECIS framework or its profiles for
      any particular use is intended.
      The reader is referred to <xref target="RFC8264" format="default"/> for a
      discussion of the general security of the PRECIS framework.
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8264.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6365.xml"/>
        <reference
          anchor="IANA.PRECIS.derived.property.value"
          target="https://www.iana.org/assignments/precis-tables-6.3.0/precis-tables-6.3.0.xhtml">
          <front>
            <title>PRECIS Derived Property Value</title>
            <author
              fullname="Patrik Fältström"
              asciiFullname="Patrik Faltstrom"
              initials="P."
              surname="Fältström"
              asciiSurname="Faltstrom"/>
            <date year="2015" month="March" day="23"/>
          </front>
          <format
            type="TXT"
            target="https://www.iana.org/assignments/precis-tables-6.3.0/precis-tables-6.3.0.txt"/>
        </reference>
        <reference anchor="Unicode" target="http://www.unicode.org/versions/latest/">
          <front>
            <title>The Unicode Standard</title>
            <author>
              <organization>The Unicode Consortium</organization>
            </author>
            <date/>
          </front>
        </reference>
      </references>
    </references>
    <section anchor="acks" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>
      The author would like to thank Marcel van Lohuizen of Google for his help
      and code reviews on the Go programming language implementation of PRECIS
      for which these tests were designed and for contributing many of the tests
      himself.
      Also, Peter Saint-Andre for his encouragement on this document.
      </t>
    </section>
  </back>
</rfc>
