< prev index next >

test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java

Print this page
rev 47480 : [mq]: 8176841

*** 38,48 **** import tests.JImageValidator; import tests.Result; /* * @test ! * @bug 8152143 8152704 8155649 8165804 8185841 * @summary IncludeLocalesPlugin tests * @author Naoto Sato * @library ../../lib * @modules java.base/jdk.internal.jimage * jdk.jdeps/com.sun.tools.classfile --- 38,48 ---- import tests.JImageValidator; import tests.Result; /* * @test ! * @bug 8152143 8152704 8155649 8165804 8185841 8176841 * @summary IncludeLocalesPlugin tests * @author Naoto Sato * @library ../../lib * @modules java.base/jdk.internal.jimage * jdk.jdeps/com.sun.tools.classfile
*** 68,77 **** --- 68,85 ---- private final static int ERROR_MESSAGE = 5; private static int errors; private final static Object[][] testData = { + // Test data should include: + // - --include-locales command line option + // - --add-modules command line option values + // - List of required resources in the result image + // - List of resources that should not exist in the result image + // - List of available locales in the result image + // - Error message + // without --include-locales option: should include all locales { "", "jdk.localedata", List.of(
*** 385,394 **** --- 393,430 ---- "(root)", "en", "en_US", "en_US_POSIX", "in", "in_ID", "iw", "iw_IL", "ji", "ji_001"), "", }, + // Langtag including extensions. Should be ignored. + { + "--include-locales=en,ja-u-nu-thai", + "jdk.localedata", + List.of( + "/jdk.localedata/sun/text/resources/ext/FormatData_en_GB.class", + "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_en_001.class"), + List.of( + "/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ja.class", + "/jdk.localedata/sun/text/resources/ext/FormatData_th.class"), + List.of( + "(root)", "en", "en_001", "en_150", "en_AG", "en_AI", "en_AS", "en_AT", + "en_AU", "en_BB", "en_BE", "en_BI", "en_BM", "en_BS", "en_BW", "en_BZ", + "en_CA", "en_CC", "en_CH", "en_CK", "en_CM", "en_CX", "en_CY", "en_DE", + "en_DG", "en_DK", "en_DM", "en_ER", "en_FI", "en_FJ", "en_FK", "en_FM", + "en_GB", "en_GD", "en_GG", "en_GH", "en_GI", "en_GM", "en_GU", "en_GY", + "en_HK", "en_IE", "en_IL", "en_IM", "en_IN", "en_IO", "en_JE", "en_JM", + "en_KE", "en_KI", "en_KN", "en_KY", "en_LC", "en_LR", "en_LS", "en_MG", + "en_MH", "en_MO", "en_MP", "en_MS", "en_MT", "en_MU", "en_MW", "en_MY", + "en_NA", "en_NF", "en_NG", "en_NL", "en_NR", "en_NU", "en_NZ", "en_PG", + "en_PH", "en_PK", "en_PN", "en_PR", "en_PW", "en_RW", "en_SB", "en_SC", + "en_SD", "en_SE", "en_SG", "en_SH", "en_SI", "en_SL", "en_SS", "en_SX", + "en_SZ", "en_TC", "en_TK", "en_TO", "en_TT", "en_TV", "en_TZ", "en_UG", + "en_UM", "en_US", "en_US_POSIX", "en_VC", "en_VG", "en_VI", "en_VU", + "en_WS", "en_ZA", "en_ZM", "en_ZW"), + "", + }, + // Error case: No matching locales { "--include-locales=xyz", "jdk.localedata", null,
< prev index next >