FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: consolidate utf8 text fixtures in tests by joyeecheung · Pull Request #50732 · nodejs/node · GitHub

/ node Public

test: consolidate utf8 text fixtures in tests - #50732

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
joyeecheung:utf8-fixture
Nov 28, 2023
Merged

test: consolidate utf8 text fixtures in tests#50732
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
joyeecheung:utf8-fixture

Conversation

joyeecheung commented Nov 14, 2023
edited
Loading

Copy link
Copy Markdown
Member

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

nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Nov 14, 2023
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 added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 14, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 14, 2023

Copy link
Copy Markdown
Collaborator

joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 15, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 15, 2023

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 27, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 27, 2023

Copy link
Copy Markdown
Collaborator

joyeecheung added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Nov 28, 2023
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Nov 28, 2023
nodejs-github-bot merged commit 97c29de into nodejs:main Nov 28, 2023

Copy link
Copy Markdown
Collaborator

Landed in 97c29de

targos pushed a commit that referenced this pull request Dec 4, 2023
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

PR-URL: #50732
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
targos mentioned this pull request Dec 4, 2023
richardlau pushed a commit that referenced this pull request Mar 25, 2024
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

PR-URL: #50732
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
richardlau mentioned this pull request Mar 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL