@@ -27,7 +27,8 @@ test('Historical titlecase digraphs retain their identity mapping', async (t) =>
2727} ) ;
2828
2929test ( 'Block values cover Unicode, including No_Block gaps' , async ( t ) => {
30- for ( const version of [ '2.0.14' , '3.1.0' , '18.0.0' ] ) {
30+ // Earlier files overlap Arabic Presentation Forms-B and Specials at U+FEFF.
31+ for ( const version of [ '2.1.9' , '3.1.0' , '18.0.0' ] ) {
3132 const blocks = await parseBlocks ( version ) ;
3233 t . assert . ok ( blocks . No_Block . contains ( 0x40000 ) , version ) ;
3334 t . assert . ok ( ! blocks . No_Block . contains ( 0x41 ) , version ) ;
@@ -50,6 +51,31 @@ test('Block values cover Unicode, including No_Block gaps', async (t) => {
5051 t . assert . equal ( await parseBlocks ( '1.1.5' ) , undefined ) ;
5152} ) ;
5253
54+ test ( 'Legacy blocks retain every discontiguous Specials range' , async ( t ) => {
55+ for ( const version of [
56+ '2.0.14' ,
57+ '2.1.2' ,
58+ '2.1.5' ,
59+ '2.1.8' ,
60+ '2.1.9' ,
61+ '3.0.0' ,
62+ '3.0.1' ,
63+ ] ) {
64+ const blocks = await parseBlocks ( version ) ;
65+ t . assert . ok ( blocks . Specials . contains ( 0xfeff ) , version ) ;
66+ t . assert . ok ( blocks . Specials . contains ( 0xfff0 ) , version ) ;
67+ t . assert . ok ( blocks . Specials . contains ( 0xfffd ) , version ) ;
68+ t . assert . ok ( ! blocks . Specials . contains ( 0xff00 ) , version ) ;
69+ t . assert . ok ( ! blocks . No_Block . contains ( 0xfeff ) , version ) ;
70+ // Preserve the overlap explicitly recorded by the earliest source files.
71+ t . assert . equal (
72+ blocks . Arabic_Presentation_Forms_B . contains ( 0xfeff ) ,
73+ [ '2.0.14' , '2.1.2' , '2.1.5' , '2.1.8' ] . includes ( version ) ,
74+ version ,
75+ ) ;
76+ }
77+ } ) ;
78+
5379test ( 'Hangul has pairwise canonical decomposition mappings' , async ( t ) => {
5480 for ( const version of [ '2.0.14' , '3.2.0' , '18.0.0' ] ) {
5581 const { Canonical } = await parseDecompositionMapping ( version ) ;
0 commit comments