Skip to content
New issue

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

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

Already on GitHub? # to your account

Add tests to ensure Unicode string comparison is by codepoint - Issue #570 #735

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions tests/draft6/const.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,5 +338,57 @@
"valid": false
}
]
},
{
"description": "graphemes evaluated codepoint-for-codepoint",
"schema": { "const": "μ" },
"tests": [
{
"description": "grapheme is equal for codepoint",
"data": "μ",
"valid": true
},
{
"description": "grapheme is not equal for codepoint",
"data": "µ",
"valid": false
},
{
"description": "codepoint is equal for grapheme",
"data": "\u03bc",
"valid": true
},
{
"description": "codepoint is not equal for grapheme",
"data": "\u00b5",
"valid": false
}
]
},
{
"description": "combining marks evaluated codepoint-for-codepoint",
"schema": { "const": "a\u0308" },
"tests": [
{
"description": "grapheme is equal codepoint-for-codepoint",
"data": "ä",
"valid": true
},
{
"description": "grapheme is not equal codepoint-for-codepoint",
"data": "ä",
"valid": false
},
{
"description": "codepoints are equal codepoint-for-codepoint",
"data": "\u0061\u0308",
"valid": true
},
{
"description": "codepoints are not equal codepoint-for-codepoint",
"data": "\u00e4",
"valid": false
}
]
}
]
Loading