-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the security invariants to their own CI check (#834)
Co-authored-by: Markus Scherer <[email protected]>
- Loading branch information
Showing
5 changed files
with
117 additions
and
49 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
28 changes: 28 additions & 0 deletions
28
unicodetools/src/main/resources/org/unicode/text/UCD/SecurityInvariantTest.txt
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,28 @@ | ||
# Invariant tests for UTS #39 data. | ||
# These tests are separate from the UCD tests in UnicodeInvariantTest.txt to | ||
# allow for UCD development ahead of UTS #39 development, from recommendation | ||
# for provisional assignment up to and including α. | ||
|
||
# https://www.unicode.org/reports/tr39/#Identifier_Status_and_Type | ||
|
||
# “Unassigned characters, private use characters, surrogates, non-whitespace control characters.” | ||
\p{Identifier_Type=Not_Character} = [\p{gc=Cn}\p{gc=Co}\p{gc=Cs}\p{gc=Cc}-\p{White_Space}] | ||
|
||
# “Multiple values are not assigned to characters with strong restrictions: | ||
# Not_Character, Deprecated, Default_Ignorable, Not_NFKC.” | ||
\p{Identifier_Type=Deprecated} = \p{Deprecated} | ||
|
||
# When a code point fits the criteria for multiple restrictions, then the strongest one wins. | ||
# For example, Default_Ignorable is trumped by unassigned and Deprecated. | ||
\p{Identifier_Type=Default_Ignorable} = [\p{Default_Ignorable_Code_Point}-\p{gc=Cn}-\p{Deprecated}] | ||
|
||
\p{Identifier_Type=Not_NFKC} = [\p{NFKC_QC=No}-\p{Deprecated}-\p{Default_Ignorable_Code_Point}] | ||
|
||
Let $Strongly_Restricted = [\p{Identifier_Type=Not_Character}\p{Identifier_Type=Deprecated}\p{Identifier_Type=Default_Ignorable}\p{Identifier_Type=Not_NFKC}] | ||
|
||
\p{Identifier_Type=Not_XID} = [\P{XID_Continue}-$Strongly_Restricted-\p{Identifier_Type=Inclusion}] | ||
|
||
# By definition, no character can have both Exclusion and Limited_Use. | ||
\p{Identifier_Type=Exclusion} ∥ \p{Identifier_Type=Limited_Use} | ||
|
||
\p{Identifier_Status=Allowed} = [\p{Identifier_Type=Inclusion}\p{Identifier_Type=Recommended}] |
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