Make TestAttributeValues cause error, not warning

Description

We have a test for invalid attribute values (TestAttributeValues.java), but it currently just has a warning. Modify it to cause an error, so that problems are not overlooked.

xpath

None

locale

None

Activity

Show:
Mark Davis
February 28, 2020, 2:39 AM
Edited

Made some fixes to the test and DTDs so that the test passes, then turned the warning into an error. Also updated documentation for how to handle failures, and made the test point to that documentation.

See http://cldr.unicode.org/development/testattributevalues

Note that I found and fixed a bug when doing this: "segment" was not a valid bcp47 "nu" value.

Mark Davis
November 27, 2019, 1:55 PM

Here is the current items that need fixing:

 

TestAttributeValues {

TestValid {

Warning: (TestAttributeValues.java:109)

file Count: supplementalData 378

element Count: supplementalData 15839

attribute Count: supplementalData 36644

status dtdType element attribute match #attr values attr values

invalid supplementalData languageAlias replacement validity/locale 5 en-x-i-default, nan-x-zh-min, see-x-i-mingo, und-x-i-enochian, xtg-x-cel-gaulish

invalid supplementalData languageAlias type or/validity/locale||literal/aa_SAAHO, aar, abk, afr, aka, alb, amh, ara, arg, arm, art_lojban, asm, ava, ave, aym, aze, bak, bam, baq, bel, ben, bih, bis, bod, bos, bre, bul, bur, cat, ces, cha, che, chi, chu, chv, cor, cos, cre, cym, cze, dan, deu, div, dut, dzo, ell, eng, epo, est, eus, ewe, fao, fas, fij, fin, fra, fre, fry, ful, geo, ger, gla, gle, glg, glv, gre, grn, guj, hat, hau, hbs, heb, her, hin, hmo, hrv, hun, hye, i_ami, i_bnn, i_hak, i_klingon, i_lux, i_navajo, i_pwn, i_tao, i_tay, i_tsu, ibo, ice, ido, iii, iku, ile, ina, ind, ipk, isl, ita, jav, jpn, kal, kan, kas, kat, kau, kaz, khm, kik, kin, kir, kom, kon, kor, kua, kur, lao, lat, lav, lim, lin, lit, ltz, lub, lug, mac, mah, mal, mao, mar, may, mkd, mlg, mlt, mol, mon, mri, msa, mya, nau, nav, nbl, nde, ndo, nep, nld, nno, no_BOKMAL, no_NYNORSK, no_bok, no_nyn, nob, nor, nya, oci, oji, ori, orm, oss, pan, per, pli, pol, por, pus, que, roh, ron, rum, run, rus, sag, san, scc, scr, sgn_BE_FR, sgn_BE_NL, sgn_CH_DE, sin, slk, slo, slv, sme, smo, sna, snd, som, sot, spa, sqi, srd, srp, ssw, sun, swa, swe, tah, tam, tat, tel, tgk, tgl, tha, tib, tir, ton, tsn, tso, tuk, tur, twi, uig, ukr, urd, uzb, ven, vie, vol, wel, wln, wol, xho, yid, yor, zh_guoyu, zh_hakka, zh_min_nan, zh_xiang, zha, zho, zul 5 cel-gaulish, i-default, i-enochian, i-mingo, zh-min

invalid supplementalData subdivisionAlias replacement set/or/validity/region||validity/subdivision 3 cnmn, cz663, no50

invalid supplementalData subgroup contains set/validity/subdivision 2 itca itnu itor itsd itss, no01 no02 no03 no04 no05 no06 no07 no08 no09 no10 no11 no12 no14 no15 no18 no19 no20 no21 no22 no50

invalid supplementalData variantAlias replacement or/validity/variant||validity/region 2 hy, hyw



Warning: (TestAttributeValues.java:109)

file Count: ldml 531

element Count: ldml 1275200

attribute Count: ldml 1554490

status dtdType element attribute match #attr values attr values

invalid ldml intervalFormatItem id literal/Bh, Bhm, Gy, GyM, GyMEd, GyMMM, GyMMMEd, GyMMMd, GyMd, H, Hm, Hmv, Hv, M, MEd, MMM, MMMEEEEd, MMMEd, MMMM, MMMMEd, MMMMd, MMMd, Md, d, h, hm, hmv, hv, y, yM, yMEd, yMMM, yMMMEEEEd, yMMMEd, yMMMM, yMMMMEEEEd, yMMMMEd, yMMMMd, yMMMd, yMd 3 GGGGGyM, GGGGGyMEd, GGGGGyMd

invalid ldml key type bcp47/anykey 1 t

invalid ldml language alt literal/long, secondary, short, variant 1 menu

invalid ldml subdivision type validity/subdivision 30 AS, AW, AX, BL, CP, CW, GF, GP, GU, HK, IC, MF, MO, MP, MQ, NC, PF, PM, PR, RE, SX, TA, TF, TW, UM, VI, WF, YT, itsd, no50

Fixed

Priority

major

Assignee

Mark Davis

Reporter

Mark Davis

Reviewer

Peter Edberg

Fix versions

Components