23 /*
24 * @test
25 * @bug 4052473 4052679 4055602 4066550 4067619 4068012 4068073 4070174 4070452
26 * 4070178 4070450 4070695 4070725 4070795 4071003 4071183 4071782 4072013
27 * 4072388 4072773 4075404 4084356 4087238 4092361 4094033 4094371 4098518
28 * 4099810 4103218 4103220 4103861 4112136 4113638 4113654 4117054 4122468
29 * 4122840 4139860 4156708 4175306 4215747 4209960 4290801 4900884 4942982
30 * 4518811 4945388 4936845 4794068 4461740 4965260 4984277 4826794 5032580
31 * 5102005 5074431 6182685 6208712 6277020 6245766 6351682 6386647 6379382
32 * 6414459 6455680 6498742 6558863 6488119 6547501 6497154 6558856 6481177
33 * 6379214 6485516 6486607 4225362 4494727 6533691 6531591 6531593 6570259
34 * 6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611
35 * 6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
36 * 6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
37 * 7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
38 * 7114053 7074882 7040556 8008577 8013836 8021121 6192407 6931564 8027695
39 * 8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
40 * 8145136
41 * @summary Verify locale data
42 * @modules java.base/sun.util.resources
43 * @run main LocaleDataTest
44 * @run main LocaleDataTest -cldr
45 *
46 */
47
48 /*
49 *
50 * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
51 * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
52 *
53 * Portions copyright (c) 2007 Sun Microsystems, Inc.
54 * All Rights Reserved.
55 *
56 * The original version of this source code and documentation
57 * is copyrighted and owned by Taligent, Inc., a wholly-owned
58 * subsidiary of IBM. These materials are provided under terms
59 * of a License Agreement between Taligent and Sun. This technology
60 * is protected by multiple US and International patents.
61 *
62 * This notice and attribution to Taligent may not be removed.
128 *
129 * It's important to note what this test will NOT test. Certain changes to the locale
130 * data are meant to have certain effects on the internationalization frameworks. For
131 * instance, we could ensure round-trip formatting/parsing integrity for the full
132 * date/time format of SimpleDateFormat by making sure that the full date and time
133 * patterns include sufficient data. The test of this is not whether changes were
134 * made to the locale data; it's whether using this data gives round-trip integrity.
135 * Likewise, changing the currency patterns to use \u00a4 instead of local currency
136 * symbols isn't something that can be tested by this test; instead, you want to
137 * actually format currency values and make sure the proper currency symbol was used.
138 *
139 * This test by itself doesn't do an exhaustive comparison of locale data. It is
140 * possible to do this manually, however: Use the GenerateKeyList tool to produce
141 * a complete list of keys for the two versions of the locales you want to compare,
142 * and then diff them. This will flag additions and deletions. Generate a data file
143 * for the base version of the data using the -w option and the output from
144 * GenerateKeyList, and then use the resultant file as the data file when you run
145 * this test against the new version of the data.
146 */
147
148 import java.io.*;
149 import java.text.*;
150 import java.util.Locale;
151 import java.util.ResourceBundle;
152 import java.util.ResourceBundle.Control;
153 import java.util.MissingResourceException;
154 import sun.util.resources.LocaleData;
155
156 public class LocaleDataTest
157 {
158 static final String TEXT_RESOURCES_PACKAGE ="sun.text.resources";
159 static final String UTIL_RESOURCES_PACKAGE ="sun.util.resources";
160 static final String DEFAULT_DATAFILE ="LocaleData";
161 static String cldrSuffix = "";
162
163 public static void main(String[] args) throws Exception {
164
165 // set up our flags and our input and output streams based on the
166 // command-line arguments (exceptions generated here will propagate out
167 // to the environment)
168 BufferedReader in = null;
169 PrintWriter out = null;
170 boolean writeNewFile = false;
171 boolean doThrow = true;
172
173 for (int i = 0; i < args.length; i++) {
|
23 /*
24 * @test
25 * @bug 4052473 4052679 4055602 4066550 4067619 4068012 4068073 4070174 4070452
26 * 4070178 4070450 4070695 4070725 4070795 4071003 4071183 4071782 4072013
27 * 4072388 4072773 4075404 4084356 4087238 4092361 4094033 4094371 4098518
28 * 4099810 4103218 4103220 4103861 4112136 4113638 4113654 4117054 4122468
29 * 4122840 4139860 4156708 4175306 4215747 4209960 4290801 4900884 4942982
30 * 4518811 4945388 4936845 4794068 4461740 4965260 4984277 4826794 5032580
31 * 5102005 5074431 6182685 6208712 6277020 6245766 6351682 6386647 6379382
32 * 6414459 6455680 6498742 6558863 6488119 6547501 6497154 6558856 6481177
33 * 6379214 6485516 6486607 4225362 4494727 6533691 6531591 6531593 6570259
34 * 6509039 6609737 6610748 6645271 6507067 6873931 6450945 6645268 6646611
35 * 6645405 6650730 6910489 6573250 6870908 6585666 6716626 6914413 6916787
36 * 6919624 6998391 7019267 7020960 7025837 7020583 7036905 7066203 7101495
37 * 7003124 7085757 7028073 7171028 7189611 8000983 7195759 8004489 8006509
38 * 7114053 7074882 7040556 8008577 8013836 8021121 6192407 6931564 8027695
39 * 8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
40 * 8145136
41 * @summary Verify locale data
42 * @modules java.base/sun.util.resources
43 * @modules jdk.localedata
44 * @run main LocaleDataTest
45 * @run main LocaleDataTest -cldr
46 *
47 */
48
49 /*
50 *
51 * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
52 * (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
53 *
54 * Portions copyright (c) 2007 Sun Microsystems, Inc.
55 * All Rights Reserved.
56 *
57 * The original version of this source code and documentation
58 * is copyrighted and owned by Taligent, Inc., a wholly-owned
59 * subsidiary of IBM. These materials are provided under terms
60 * of a License Agreement between Taligent and Sun. This technology
61 * is protected by multiple US and International patents.
62 *
63 * This notice and attribution to Taligent may not be removed.
129 *
130 * It's important to note what this test will NOT test. Certain changes to the locale
131 * data are meant to have certain effects on the internationalization frameworks. For
132 * instance, we could ensure round-trip formatting/parsing integrity for the full
133 * date/time format of SimpleDateFormat by making sure that the full date and time
134 * patterns include sufficient data. The test of this is not whether changes were
135 * made to the locale data; it's whether using this data gives round-trip integrity.
136 * Likewise, changing the currency patterns to use \u00a4 instead of local currency
137 * symbols isn't something that can be tested by this test; instead, you want to
138 * actually format currency values and make sure the proper currency symbol was used.
139 *
140 * This test by itself doesn't do an exhaustive comparison of locale data. It is
141 * possible to do this manually, however: Use the GenerateKeyList tool to produce
142 * a complete list of keys for the two versions of the locales you want to compare,
143 * and then diff them. This will flag additions and deletions. Generate a data file
144 * for the base version of the data using the -w option and the output from
145 * GenerateKeyList, and then use the resultant file as the data file when you run
146 * this test against the new version of the data.
147 */
148
149 import java.io.BufferedReader;
150 import java.io.File;
151 import java.io.FileInputStream;
152 import java.io.FilterReader;
153 import java.io.FilterWriter;
154 import java.io.IOException;
155 import java.io.InputStreamReader;
156 import java.io.OutputStreamWriter;
157 import java.io.PrintWriter;
158 import java.io.Reader;
159 import java.io.Writer;
160 import java.util.Locale;
161 import java.util.MissingResourceException;
162 import java.util.ResourceBundle;
163 import sun.util.resources.LocaleData;
164
165 public class LocaleDataTest
166 {
167 static final String TEXT_RESOURCES_PACKAGE ="sun.text.resources";
168 static final String UTIL_RESOURCES_PACKAGE ="sun.util.resources";
169 static final String DEFAULT_DATAFILE ="LocaleData";
170 static String cldrSuffix = "";
171
172 public static void main(String[] args) throws Exception {
173
174 // set up our flags and our input and output streams based on the
175 // command-line arguments (exceptions generated here will propagate out
176 // to the environment)
177 BufferedReader in = null;
178 PrintWriter out = null;
179 boolean writeNewFile = false;
180 boolean doThrow = true;
181
182 for (int i = 0; i < args.length; i++) {
|