[Docs] [txt|pdf|xml|html] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02 03

PRECIS                                                         S. Whited
Internet-Draft                                             25 April 2020
Intended status: Standards Track
Expires: 27 October 2020


 Preparation, Enforcement, and Comparison of Internationalized Strings
                         (PRECIS) Test Vectors
                  draft-whited-precis-test-vectors-03

Abstract

   This document contains machine readable test vectors for several
   Preparation, Enforcement, and Comparison of Internationalized Strings
   (PRECIS) profiles.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 27 October 2020.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Simplified BSD License text
   as described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Simplified BSD License.





Whited                   Expires 27 October 2020                [Page 1]


Internet-Draft                PRECIS: Tests                   April 2020


Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.2.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Test Vectors  . . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Methodology . . . . . . . . . . . . . . . . . . . . . . .   3
       2.1.1.  Enforcement Tests . . . . . . . . . . . . . . . . . .   3
         2.1.1.1.  Basic . . . . . . . . . . . . . . . . . . . . . .   3
         2.1.1.2.  Context Rule 1  . . . . . . . . . . . . . . . . .   4
         2.1.1.3.  Context Rule 2  . . . . . . . . . . . . . . . . .   5
         2.1.1.4.  Context Rule 3  . . . . . . . . . . . . . . . . .   5
         2.1.1.5.  Context Rule 4  . . . . . . . . . . . . . . . . .   6
         2.1.1.6.  Context Rule 5+6  . . . . . . . . . . . . . . . .   6
         2.1.1.7.  Context Rule 7  . . . . . . . . . . . . . . . . .   7
         2.1.1.8.  Context Rule 8+9  . . . . . . . . . . . . . . . .   7
         2.1.1.9.  Nickname  . . . . . . . . . . . . . . . . . . . .   8
         2.1.1.10. OpaqueString  . . . . . . . . . . . . . . . . . .   9
         2.1.1.11. UsernameCaseMapped  . . . . . . . . . . . . . . .  10
         2.1.1.12. UsernameCasePreserved . . . . . . . . . . . . . .  12
         2.1.1.13. UsernameCaseMappedRestricted  . . . . . . . . . .  12
       2.1.2.  Comparison Tests  . . . . . . . . . . . . . . . . . .  12
         2.1.2.1.  Nickname  . . . . . . . . . . . . . . . . . . . .  12
   3.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  13
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  13
   5.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  13
     5.1.  Normative References  . . . . . . . . . . . . . . . . . .  13
     5.2.  Informative References  . . . . . . . . . . . . . . . . .  14
   Appendix A.  Acknowledgements . . . . . . . . . . . . . . . . . .  14
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  14

1.  Introduction

1.1.  Overview

   This document contains machine readable test vectors for several
   Preparation, Enforcement, and Comparison of Internationalized Strings
   (PRECIS) [RFC8264] profiles.













Whited                   Expires 27 October 2020                [Page 2]


Internet-Draft                PRECIS: Tests                   April 2020


   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.

   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 [RFC8264] can
   be found in the IANA "PRECIS Derived Property Value" registry
   [IANA.PRECIS.derived.property.value].

1.2.  Terminology

   Many important terms used in this document are defined in [RFC8264],
   [RFC6365], and [Unicode].

2.  Test Vectors

2.1.  Methodology

   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.

   Input and output strings are expressed as UTF-8 and hexidecimal
   encoded byte strings.

2.1.1.  Enforcement Tests

2.1.1.1.  Basic

                      +------------+----------+-----+
                      | Input      | Output   | Err |
                      +============+==========+=====+
                      | 65cc81cc9f | c3a9cc9f |     |
                      +------------+----------+-----+

                                  Table 1





Whited                   Expires 27 October 2020                [Page 3]


Internet-Draft                PRECIS: Tests                   April 2020


2.1.1.2.  Context Rule 1

   +--------------------------------+--------------------------------+---+
   | Input                          | Output                         |Err|
   +================================+================================+===+
   | e2808c                         |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | e2808c61                       |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | 61e2808c                       |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | e2808cd8a7                     |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | d8ace2808c                     |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | d890e2808cd890d8a7             |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | d8acd890e2808cd890             |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | d8ace2808cd8a7                 | d8ace2808cd8a7                 |   |
   +--------------------------------+--------------------------------+---+
   | d8acd890e2808cd890d8a7         | d8acd890e2808cd890d8a7         |   |
   +--------------------------------+--------------------------------+---+
   | d8acd890d890e2808cd890d890d8a7 | d8acd890d890e2808cd890d890d8a7 |   |
   +--------------------------------+--------------------------------+---+
   | d8acd890e2808cd8a7             | d8acd890e2808cd8a7             |   |
   +--------------------------------+--------------------------------+---+
   | d8ace2808cd890d8a7             | d8ace2808cd890d8a7             |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2e2808cd8ac               | eaa1b2e2808cd8ac               |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2d890e2808cd890d8ac       | eaa1b2d890e2808cd890d8ac       |   |
   +--------------------------------+--------------------------------+---+
   |eaa1b2d890d890e2808cd890d890d8ac|eaa1b2d890d890e2808cd890d890d8ac|   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2d890e2808cd8ac           | eaa1b2d890e2808cd8ac           |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2e2808cd890d8ac           | eaa1b2e2808cd890d8ac           |   |
   +--------------------------------+--------------------------------+---+
   | e0a98de2808c                   | e0a98de2808c                   |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2e0a98de2808c             | eaa1b2e0a98de2808c             |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2e0a98dd890e2808c         |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | eaa1b2e0a98dd890e2808c         |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | e0ab8de2808c                   | e0ab8de2808c                   |   |



Whited                   Expires 27 October 2020                [Page 4]


Internet-Draft                PRECIS: Tests                   April 2020


   +--------------------------------+--------------------------------+---+
   | eaa1b2e0ab8de2808c             | eaa1b2e0ab8de2808c             |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2e0ab8dd890e2808c         |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | eaa1b2e0ab8dd890e2808c         |                                |ctx|
   +--------------------------------+--------------------------------+---+
   | eaa1b2e0ab8de2808cd8ac         | eaa1b2e0ab8de2808cd8ac         |   |
   +--------------------------------+--------------------------------+---+
   | eaa1b2e2808ce0ab8dd8ac         | eaa1b2e2808ce0ab8dd8ac         |   |
   +--------------------------------+--------------------------------+---+

                                  Table 2

2.1.1.3.  Context Rule 2

             +--------------------+--------------------+-----+
             | Input              | Output             | Err |
             +====================+====================+=====+
             | e2808d             |                    | ctx |
             +--------------------+--------------------+-----+
             | e2808d61           |                    | ctx |
             +--------------------+--------------------+-----+
             | 61e2808d           |                    | ctx |
             +--------------------+--------------------+-----+
             | e0a98de2808d       | e0a98de2808d       |     |
             +--------------------+--------------------+-----+
             | eaa1b2e0a98de2808d | eaa1b2e0a98de2808d |     |
             +--------------------+--------------------+-----+
             | e0a98d61e2808d     |                    | ctx |
             +--------------------+--------------------+-----+

                                  Table 3

2.1.1.4.  Context Rule 3

                   +--------------+--------------+-----+
                   | Input        | Output       | Err |
                   +==============+==============+=====+
                   | c2b7         |              | ctx |
                   +--------------+--------------+-----+
                   | 6cc2b7       |              | ctx |
                   +--------------+--------------+-----+
                   | c2b76c       |              | ctx |
                   +--------------+--------------+-----+
                   | 61c2b7       |              | ctx |
                   +--------------+--------------+-----+
                   | 6cc2b761     |              | ctx |



Whited                   Expires 27 October 2020                [Page 5]


Internet-Draft                PRECIS: Tests                   April 2020


                   +--------------+--------------+-----+
                   | 61c2b761     |              | ctx |
                   +--------------+--------------+-----+
                   | 6cc2b76c     | 6cc2b76c     |     |
                   +--------------+--------------+-----+
                   | 616cc2b76c61 | 616cc2b76c61 |     |
                   +--------------+--------------+-----+

                                  Table 4

2.1.1.5.  Context Rule 4

               +------------------+------------------+-----+
               | Input            | Output           | Err |
               +==================+==================+=====+
               | cdb5             |                  | ctx |
               +------------------+------------------+-----+
               | cdb561           |                  | ctx |
               +------------------+------------------+-----+
               | ceb1cdb5         |                  | ctx |
               +------------------+------------------+-----+
               | cdb5ceb1         | cdb5ceb1         |     |
               +------------------+------------------+-----+
               | ceb1cdb5ceb1     | ceb1cdb5ceb1     |     |
               +------------------+------------------+-----+
               | cdb5cdb5ceb1     | cdb5cdb5ceb1     |     |
               +------------------+------------------+-----+
               | ceb1cdb5cdb5ceb1 | ceb1cdb5cdb5ceb1 |     |
               +------------------+------------------+-----+
               | ceb1cdb5cdb5     |                  | ctx |
               +------------------+------------------+-----+
               | ceb1cdb5cdb561   |                  | ctx |
               +------------------+------------------+-----+

                                  Table 5

2.1.1.6.  Context Rule 5+6

             +--------------------+--------------------+-----+
             | Input              | Output             | Err |
             +====================+====================+=====+
             | d7b3               |                    | ctx |
             +--------------------+--------------------+-----+
             | d7b3d794           |                    | ctx |
             +--------------------+--------------------+-----+
             | 61d7b362           |                    | ctx |
             +--------------------+--------------------+-----+
             | d7a9d7b3           | d7a9d7b3           |     |



Whited                   Expires 27 October 2020                [Page 6]


Internet-Draft                PRECIS: Tests                   April 2020


             +--------------------+--------------------+-----+
             | d7a9d7b3d7b3d7b3   | d7a9d7b3d7b3d7b3   |     |
             +--------------------+--------------------+-----+
             | d7b4               |                    | ctx |
             +--------------------+--------------------+-----+
             | d7b4d794           |                    | ctx |
             +--------------------+--------------------+-----+
             | 61d7b462           |                    | ctx |
             +--------------------+--------------------+-----+
             | d7a9d7b4           | d7a9d7b4           |     |
             +--------------------+--------------------+-----+
             | d7a9d7b4d7b4d7b4   | d7a9d7b4d7b4d7b4   |     |
             +--------------------+--------------------+-----+
             | 61d7a9d7b4d7b4d7b4 | 61d7a9d7b4d7b4d7b4 |     |
             +--------------------+--------------------+-----+

                                  Table 6

2.1.1.7.  Context Rule 7

         +------------------------+------------------------+-----+
         | Input                  | Output                 | Err |
         +========================+========================+=====+
         | e383bb                 |                        | ctx |
         +------------------------+------------------------+-----+
         | 616263e383bb           |                        | ctx |
         +------------------------+------------------------+-----+
         | e383bb646566           |                        | ctx |
         +------------------------+------------------------+-----+
         | 616263e383bb646566     |                        | ctx |
         +------------------------+------------------------+-----+
         | 61e3838563e383bb646566 | 61e3838563e383bb646566 |     |
         +------------------------+------------------------+-----+
         | 616263e383bb64e381b666 | 616263e383bb64e381b666 |     |
         +------------------------+------------------------+-----+
         | e2ba906263e383bb646566 | e2ba906263e383bb646566 |     |
         +------------------------+------------------------+-----+

                                  Table 7

2.1.1.8.  Context Rule 8+9

         +--------------------------+----------------------+-----+
         | Input                    | Output               | Err |
         +==========================+======================+=====+
         | d9a1d9a2d9a3d9a4d9a5dbb6 |                      | ctx |
         +--------------------------+----------------------+-----+
         | dbb1dbb2dbb3dbb4dbb5d9a6 |                      | ctx |



Whited                   Expires 27 October 2020                [Page 7]

Internet-Draft                PRECIS: Tests                   April 2020


         +--------------------------+----------------------+-----+
         | d9a1d9a2d9a3d9a4d9a5     | d9a1d9a2d9a3d9a4d9a5 |     |
         +--------------------------+----------------------+-----+
         | dbb1dbb2dbb3dbb4dbb5     | dbb1dbb2dbb3dbb4dbb5 |     |
         +--------------------------+----------------------+-----+

                                  Table 8

2.1.1.9.  Nickname

   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | Input                                                                                                                          | Output                                                           | Err |
   +================================================================================================================================+==================================================================+=====+
   | 20205377616e20206f6620202041766f6e202020                                                                                       | 5377616e206f662041766f6e                                         |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   |                                                                                                                                |                                                                  |empty|
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 20                                                                                                                             |                                                                  |empty|
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 2020                                                                                                                           |                                                                  |empty|
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   |61c2a061e19a8061e2808061e2808161e2808261e2808361e2808461e2808561e2808661e2808761e2808861e2808961e2808a61e280af61e2819f61e3808061|612061206120612061206120612061206120612061206120612061206120612061|     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 466f6f                                                                                                                         | 466f6f                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 666f6f                                                                                                                         | 666f6f                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 466f6f20426172                                                                                                                 | 466f6f20426172                                                   |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 666f6f20626172                                                                                                                 | 666f6f20626172                                                   |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | cea3                                                                                                                           | cea3                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | cf83                                                                                                                           | cf83                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | cf82                                                                                                                           | cf82                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | e2999a                                                                                                                         | e2999a                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 5269636861726420e285a3                                                                                                         | 52696368617264204956                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | e284ab                                                                                                                         | c385                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | efac80                                                                                                                         | 6666                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | d7a961                                                                                                                         | d7a961                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | eb8f99ec9dbceca1b0eab1b4ebb380eab2bded9788eb9dbd                                                                               | eb8f99ec9dbceca1b0eab1b4ebb380eab2bded9788eb9dbd                 |     |



Whited                   Expires 27 October 2020                [Page 8]

Internet-Draft                PRECIS: Tests                   April 2020


   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+

                                  Table 9

2.1.1.10.  OpaqueString

   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | Input                                                                                                                          | Output                                                           | Err |
   +================================================================================================================================+==================================================================+=====+
   | 20205377616e20206f6620202041766f6e202020                                                                                       | 20205377616e20206f6620202041766f6e202020                         |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   |                                                                                                                                |                                                                  |empty|
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 20                                                                                                                             | 20                                                               |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 2020                                                                                                                           | 2020                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   |61c2a061e19a8061e2808061e2808161e2808261e2808361e2808461e2808561e2808661e2808761e2808861e2808961e2808a61e280af61e2819f61e3808061|612061206120612061206120612061206120612061206120612061206120612061|     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 466f6f                                                                                                                         | 466f6f                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 666f6f                                                                                                                         | 666f6f                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 466f6f20426172                                                                                                                 | 466f6f20426172                                                   |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 666f6f20626172                                                                                                                 | 666f6f20626172                                                   |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | cf83                                                                                                                           | cf83                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 5269636861726420e285a3                                                                                                         | 5269636861726420e285a3                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | e284ab                                                                                                                         | c385                                                             |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 4a61636b206f6620e299a673                                                                                                       | 4a61636b206f6620e299a673                                         |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | 6d7920636174206973206120096279                                                                                                 |                                                                  |rune |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+
   | d7a961                                                                                                                         | d7a961                                                           |     |
   +--------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------+-----+

                                  Table 10










Whited                   Expires 27 October 2020                [Page 9]


Internet-Draft                PRECIS: Tests                   April 2020


2.1.1.11.  UsernameCaseMapped

   +------------------------------------+------------------------------------+---------+
   | Input                              | Output                             | Err     |
   +====================================+====================================+=========+
   |6a756c696574406578616d706c652e636f6d|6a756c696574406578616d706c652e636f6d|         |
   +------------------------------------+------------------------------------+---------+
   | 6675737362616c6c                   | 6675737362616c6c                   |         |
   +------------------------------------+------------------------------------+---------+
   | 6675c39f62616c6c                   | 6675c39f62616c6c                   |         |
   +------------------------------------+------------------------------------+---------+
   | cf80                               | cf80                               |         |
   +------------------------------------+------------------------------------+---------+
   | cea3                               | cf83                               |         |
   +------------------------------------+------------------------------------+---------+
   | cf83                               | cf83                               |         |
   +------------------------------------+------------------------------------+---------+
   | cf82                               | cf82                               |         |
   +------------------------------------+------------------------------------+---------+
   | 49                                 | 69                                 |         |
   +------------------------------------+------------------------------------+---------+
   | 49                                 | 69                                 |         |
   +------------------------------------+------------------------------------+---------+
   | cf92                               |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | ceb0                               | ceb0                               |         |
   +------------------------------------+------------------------------------+---------+
   | 666f6f20626172                     |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | e2999a                             |                                    |bidirule:|
   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|
   +------------------------------------+------------------------------------+---------+
   | 7e                                 | 7e                                 |         |
   +------------------------------------+------------------------------------+---------+
   | 61                                 | 61                                 |         |
   +------------------------------------+------------------------------------+---------+
   | 21                                 | 21                                 |         |
   +------------------------------------+------------------------------------+---------+
   | c2b2                               |                                    |bidirule:|
   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|
   +------------------------------------+------------------------------------+---------+
   | 09                                 |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | 0a                                 |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | e29b96                             |                                    |bidirule:|



Whited                   Expires 27 October 2020               [Page 10]


Internet-Draft                PRECIS: Tests                   April 2020


   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|
   +------------------------------------+------------------------------------+---------+
   | e29bbf                             |                                    |bidirule:|
   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|
   +------------------------------------+------------------------------------+---------+
   | efac80                             |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | e19a80                             |                                    |bidirule:|
   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|
   +------------------------------------+------------------------------------+---------+
   | 20                                 |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | 2020                               |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | c785                               |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | e19bae                             |                                    | rune    |
   +------------------------------------+------------------------------------+---------+
   | d288                               |                                    |bidirule:|
   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|
   +------------------------------------+------------------------------------+---------+
   | e284ab                             | c3a5                               |         |
   +------------------------------------+------------------------------------+---------+
   | 41cc8a                             | c3a5                               |         |
   +------------------------------------+------------------------------------+---------+
   | c385                               | c3a5                               |         |
   +------------------------------------+------------------------------------+---------+
   | c3a7                               | c3a7                               |         |
   +------------------------------------+------------------------------------+---------+
   | 63cca7                             | c3a7                               |         |
   +------------------------------------+------------------------------------+---------+
   | c598                               | c599                               |         |
   +------------------------------------+------------------------------------+---------+
   | 52cc8c                             | c599                               |         |
   +------------------------------------+------------------------------------+---------+
   | e1b9a1                             | e1b9a1                             |         |
   +------------------------------------+------------------------------------+---------+
   | d090                               | d0b0                               |         |
   +------------------------------------+------------------------------------+---------+
   | efbca1efbca2                       | 6162                               |         |
   +------------------------------------+------------------------------------+---------+
   | d7a963                             |                                    |bidirule:|
   |                                    |                                    | failed  |
   |                                    |                                    |Bidi Rule|



Whited                   Expires 27 October 2020               [Page 11]


Internet-Draft                PRECIS: Tests                   April 2020


   +------------------------------------+------------------------------------+---------+

                                  Table 11

2.1.1.12.  UsernameCasePreserved

          +--------------+--------+----------------------------+
          | Input        | Output | Err                        |
          +==============+========+============================+
          | 414243       | 414243 |                            |
          +--------------+--------+----------------------------+
          | efbca1efbca2 | 4142   |                            |
          +--------------+--------+----------------------------+
          | d7a963       |        | bidirule: failed Bidi Rule |
          +--------------+--------+----------------------------+
          | efac80       |        | rune                       |
          +--------------+--------+----------------------------+
          | e284ab       | c385   |                            |
          +--------------+--------+----------------------------+
          | e1ba9b       |        | rune                       |
          +--------------+--------+----------------------------+

                                 Table 12

2.1.1.13.  UsernameCaseMappedRestricted

         +--------------------------------------+--------+------+
         | Input                                | Output | Err  |
         +======================================+========+======+
         | 6a756c696574406578616d706c652e636f6d |        | rune |
         +--------------------------------------+--------+------+
         | 49                                   | 69     |      |
         +--------------------------------------+--------+------+

                                 Table 13

2.1.2.  Comparison Tests

2.1.2.1.  Nickname

   +----------------------------------------+------------------------+------+
   | A                                      | B                      |Result|
   +========================================+========================+======+
   | 61                                     | 62                     |false |
   +----------------------------------------+------------------------+------+
   |20205377616e20206f6620202041766f6e202020|7377616e206f662061766f6e| true |
   +----------------------------------------+------------------------+------+
   | 466f6f                                 | 666f6f                 | true |



Whited                   Expires 27 October 2020               [Page 12]


Internet-Draft                PRECIS: Tests                   April 2020


   +----------------------------------------+------------------------+------+
   | 666f6f                                 | 666f6f                 | true |
   +----------------------------------------+------------------------+------+
   | 466f6f20426172                         | 666f6f20626172         | true |
   +----------------------------------------+------------------------+------+
   | 666f6f20626172                         | 666f6f20626172         | true |
   +----------------------------------------+------------------------+------+
   | cea3                                   | cf83                   | true |
   +----------------------------------------+------------------------+------+
   | cea3                                   | cf82                   |false |
   +----------------------------------------+------------------------+------+
   | cf83                                   | cf82                   |false |
   +----------------------------------------+------------------------+------+
   | 5269636861726420e285a3                 | 72696368617264206976   | true |
   +----------------------------------------+------------------------+------+
   | e284ab                                 | c3a5                   | true |
   +----------------------------------------+------------------------+------+
   | efac80                                 | 6666                   | true |
   +----------------------------------------+------------------------+------+
   | c39f                                   | 7353                   |false |
   +----------------------------------------+------------------------+------+
   | c2a8                                   | 20cc88                 | true |
   +----------------------------------------+------------------------+------+
   | c2a8                                   | cc88                   | true |
   +----------------------------------------+------------------------+------+
   | 20cc88                                 | cc88                   | true |
   +----------------------------------------+------------------------+------+

                                  Table 14

3.  IANA Considerations

   This document requires no interaction with the Internet Assigned
   Numbers Authority (IANA).

4.  Security Considerations

   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 [RFC8264] for a discussion of the general
   security of the PRECIS framework.

5.  References

5.1.  Normative References





Whited                   Expires 27 October 2020               [Page 13]


Internet-Draft                PRECIS: Tests                   April 2020


   [RFC8264]  Saint-Andre, P. and M. Blanchet, "PRECIS Framework:
              Preparation, Enforcement, and Comparison of
              Internationalized Strings in Application Protocols",
              RFC 8264, DOI 10.17487/RFC8264, October 2017,
              <https://www.rfc-editor.org/info/rfc8264>.

5.2.  Informative References

   [IANA.PRECIS.derived.property.value]
              Fältström, P., "PRECIS Derived Property Value", 23 March
              2015, <https://www.iana.org/assignments/precis-tables-
              6.3.0/precis-tables-6.3.0.xhtml>.

   [RFC6365]  Hoffman, P. and J. Klensin, "Terminology Used in
              Internationalization in the IETF", BCP 166, RFC 6365,
              DOI 10.17487/RFC6365, September 2011,
              <https://www.rfc-editor.org/info/rfc6365>.

   [Unicode]  The Unicode Consortium, "The Unicode Standard",
              <http://www.unicode.org/versions/latest/>.

Appendix A.  Acknowledgements

   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.

Author's Address

   Sam Whited
   Atlanta,  GA
   United States of America

   Email: sam@samwhited.com
   URI:   https://blog.samwhited.com/














Whited                   Expires 27 October 2020               [Page 14]


Html markup produced by rfcmarkup 1.129d, available from https://tools.ietf.org/tools/rfcmarkup/