@@ -5,12 +5,39 @@ import parseEmojiSequences from '../scripts/parse-emoji-sequences.mjs';
55import parseBidiBrackets from '../scripts/parse-bidi-brackets.mjs' ;
66import parseNameAliases from '../scripts/parse-name-aliases.mjs' ;
77import parseSimpleCaseMapping from '../scripts/parse-simple-case-mapping.mjs' ;
8+ import parseJoiningType from '../scripts/parse-joining-type.mjs' ;
89import {
910 parseBlocks ,
1011 parseDerivedCoreProperties ,
1112} from '../scripts/parse-blocks-scripts-properties.mjs' ;
1213import utils from '../scripts/utils.mjs' ;
1314
15+ test ( 'Explicit Non_Joining records remain in the default joining set' , async ( t ) => {
16+ t . mock . method ( utils , 'readDataFile' , ( version , type ) =>
17+ type === 'derived-joining-type'
18+ ? '0041; U\n0042..0043; U\n0628; D\n0300..0301; T\n'
19+ : undefined ,
20+ ) ;
21+ const map = await parseJoiningType ( '18.0.0' ) ;
22+ for ( const [ cp , type ] of [
23+ [ 0x41 , 'Non_Joining' ] ,
24+ [ 0x42 , 'Non_Joining' ] ,
25+ [ 0x43 , 'Non_Joining' ] ,
26+ [ 0x378 , 'Non_Joining' ] ,
27+ [ 0x10ffff , 'Non_Joining' ] ,
28+ [ 0x628 , 'Dual_Joining' ] ,
29+ [ 0x300 , 'Transparent' ] ,
30+ [ 0x301 , 'Transparent' ] ,
31+ ] ) {
32+ t . assert . ok ( map [ type ] . contains ( cp ) ) ;
33+ t . assert . equal (
34+ Object . values ( map ) . filter ( ( set ) => set . contains ( cp ) ) . length ,
35+ 1 ,
36+ ) ;
37+ }
38+ t . assert . equal ( map . Non_Joining . toArray ( ) . length , 0x110000 - 3 ) ;
39+ } ) ;
40+
1441test ( 'Null simple titlecase mappings default to uppercase mappings' , async ( t ) => {
1542 t . mock . method ( utils , 'readDataFile' , ( ) =>
1643 [
0 commit comments