Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: consolidate utf8 text fixtures in tests #50732

Merged
merged 2 commits into from
Nov 28, 2023

Commits on Nov 14, 2023

  1. test: consolidate utf8 text fixtures in tests

    We previously used a text that appears to be an excerpt of
    https://zh.wikipedia.org/wiki/%E5%8D%97%E8%B6%8A%E5%9B%BD
    and can have copyright/license complications. It may
    also include some geopolitical nuances. The text has been
    repeated through out the code base without much reuse.
    
    This patch consolidates the fixtures by adding a common helper
    string as `fixtures.utf8TestText` which is identical to a copy
    in test/fixtures/utf8_test_text.txt. It also updates the text
    to a copy of 蘭亭集序, It was chosen because:
    
    1. It's a well-known Chinese classical piece written in 353 CE
       and therefore in public domain. The string is copied from
       https://zh.wikisource.org/zh-hant/%E8%98%AD%E4%BA%AD%E9%9B%86%E5%BA%8F
       which contains a disclaimer of copyright for this reason.
    2. The text is in suitable length for general UTF8 string
       read/write tests (including punctuations, 389 code points and
       1167 bytes).
    3. This is also commonly used as reference text for Chinese text
       layout tests.
    4. It's a timeless and harmless preface for a collection of poems,
       written by a uncontroversial figure who passed away >1600 years
       ago and contains no geopolitical nuances. Background and an
       English translation of this text can be found at
       https://en.wikipedia.org/wiki/Lantingji_Xu
    joyeecheung committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    8937b68 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b26fd59 View commit details
    Browse the repository at this point in the history