11import { test } from 'node:test' ;
22import parseDecompositionMapping from '../scripts/parse-decomposition-mapping.mjs' ;
3+ import parseIndicConjunctBreak from '../scripts/parse-indic-conjunct-break.mjs' ;
34import {
45 parseDerivedCoreProperties ,
56 parseProperties ,
@@ -19,8 +20,35 @@ test('Hangul has pairwise canonical decomposition mappings', async (t) => {
1920 t . assert . equal ( await parseDecompositionMapping ( '1.1.5' ) , undefined ) ;
2021} ) ;
2122
23+ test ( 'Indic conjunct break retains enumerated values' , async ( t ) => {
24+ for ( const version of [ '15.1.0' , '16.0.0' , '17.0.0' , '18.0.0' ] ) {
25+ const map = await parseIndicConjunctBreak ( version ) ;
26+ t . assert . ok ( map . Linker . contains ( 0x94d ) ) ;
27+ t . assert . ok ( map . Consonant . contains ( 0x915 ) ) ;
28+ t . assert . ok ( map . Extend . contains ( 0x300 ) ) ;
29+ t . assert . ok ( map . None . contains ( 0x41 ) ) ;
30+ for ( const cp of [ 0x94d , 0x915 , 0x300 , 0x41 ] ) {
31+ t . assert . equal (
32+ Object . values ( map ) . filter ( ( set ) => set . contains ( cp ) ) . length ,
33+ 1 ,
34+ ) ;
35+ }
36+ const binary = await parseDerivedCoreProperties ( version ) ;
37+ t . assert . equal ( binary . InCB , undefined ) ;
38+ t . assert . equal ( binary . Indic_Conjunct_Break , undefined ) ;
39+ }
40+ t . assert . equal ( await parseIndicConjunctBreak ( '15.0.0' ) , undefined ) ;
41+ } ) ;
42+
2243test ( 'Binary property aliases use canonical names' , async ( t ) => {
23- for ( const version of [ '4.0.1' , '4.1.0' , '5.0.0' , '6.3.0' , '8.0.0' , '18.0.0' ] ) {
44+ for ( const version of [
45+ '4.0.1' ,
46+ '4.1.0' ,
47+ '5.0.0' ,
48+ '6.3.0' ,
49+ '8.0.0' ,
50+ '18.0.0' ,
51+ ] ) {
2452 const properties = await parseProperties ( version ) ;
2553 t . assert . ok ( properties . Sentence_Terminal . contains ( 0x21 ) ) ;
2654 t . assert . equal ( properties . STerm , undefined ) ;
@@ -63,7 +91,14 @@ test('Property records do not require spaces around semicolons', async (t) => {
6391} ) ;
6492
6593test ( 'Script defaults follow the Unicode version' , async ( t ) => {
66- for ( const version of [ '3.1.0' , '3.1.1' , '3.2.0' , '4.0.0' , '4.0.1' , '4.1.0' ] ) {
94+ for ( const version of [
95+ '3.1.0' ,
96+ '3.1.1' ,
97+ '3.2.0' ,
98+ '4.0.0' ,
99+ '4.0.1' ,
100+ '4.1.0' ,
101+ ] ) {
67102 const scripts = await parseScripts ( version ) ;
68103 t . assert . ok ( scripts . Common . contains ( 0x20 ) ) ;
69104 t . assert . ok ( scripts . Common . contains ( 0x378 ) ) ;
0 commit comments