unicode

Branch: main

Switch branches or tags

Branch: main
Go to file t

413 files indexed

History
Code

tools/internal/parsing/parsing_wbtest.mbt
1///|2test "parse ranges and sequences" {3  let range = parse_code_point_range("0041..0043")4  debug_inspect(range, content="{ start: 65, end: 67 }")5  debug_inspect(parse_code_point_sequence("0041 0307"), content="[65, 775]")6}78///|9test "parse an enumerated property with missing declarations" {10  let values = parse_enumerated_property(11    (12      #|# @missing: 0000..10FFFF; Neutral13      #|# @missing: 3400..4DBF; Wide14      #|0041..0042 ; Na # L& [2] LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER B15      #|3400 ; W16      #|17    ),18    default="N",19  )20  inspect(values.length(), content="1114112")21  inspect(values[0x40], content="Neutral")22  inspect(values[0x41], content="Na")23  inspect(values[0x42], content="Na")24  inspect(values[0x3400], content="W")25  inspect(values[0x3401], content="Wide")26  inspect(values[0x10FFFF], content="Neutral")27  // Without a `@missing` line, unlisted code points take the default.28  inspect(29    parse_enumerated_property("0041 ; Na\n", default="N")[0x40],30    content="N",31  )32}33