-
-
Notifications
You must be signed in to change notification settings - Fork 736
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICU-22942 MF2 ICU4C: NFC-normalize names and keys according to spec
- Loading branch information
1 parent
8bdb306
commit be97a13
Showing
11 changed files
with
146 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/unicode-org/message-format-wg/main/test/schemas/v0/tests.schema.json", | ||
"scenario": "Syntax", | ||
"description": "Test cases that do not depend on any registry definitions.", | ||
"defaultTestProperties": { | ||
"locale": "en-US" | ||
}, | ||
"tests": [ | ||
{ | ||
"description": "NFC: literals are not normalized", | ||
"src": "\u1E0A\u0323", | ||
"exp": "\u1E0A\u0323" | ||
}, | ||
{ | ||
"description": "NFC: variables are compared to each other as-if normalized; decl is non-normalized, use is", | ||
"src": ".local $\u0044\u0323\u0307 = {foo} {{{$\u1E0c\u0307}}}", | ||
"exp": "foo" | ||
}, | ||
{ | ||
"description": "NFC: variables are compared to each other as-if normalized; decl is normalized, use isn't", | ||
"src": ".local $\u1E0c\u0307 = {foo} {{{$\u0044\u0323\u0307}}}", | ||
"exp": "foo" | ||
}, | ||
{ | ||
"description": "NFC: variables are compared to each other as-if normalized; decl is normalized, use isn't", | ||
"src": ".input {$\u1E0c\u0307} {{{$\u0044\u0323\u0307}}}", | ||
"params": [{"name": "\u1E0c\u0307", "value": "foo"}], | ||
"exp": "foo" | ||
}, | ||
{ | ||
"description": "NFC: variables are compared to each other as-if normalized; decl is non-normalized, use is", | ||
"src": ".input {$\u0044\u0323\u0307} {{{$\u1E0c\u0307}}}", | ||
"params": [{"name": "\u0044\u0323\u0307", "value": "foo"}], | ||
"exp": "foo" | ||
}, | ||
{ | ||
"description": "NFC: keys are normalized", | ||
"src": ".local $x = {\u1E0A\u0323 :string} .match {$x} \u1E0A\u0323 {{Not normalized}} \u1E0C\u0307 {{Normalized}} * {{Wrong}}", | ||
"expErrors": [{"type": "duplicate-variant"}] | ||
}, | ||
{ | ||
"description": "NFC: keys are normalized", | ||
"src": ".local $x = {\u1E0A\u0323 :string} .match {$x} \u1E0C\u0307 {{Right}} * {{Wrong}}", | ||
"exp": "Right" | ||
} | ||
] | ||
} |