test/java/text/Format/NumberFormat/MultipleNumberScriptTest.java

Print this page




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 7073852
  27  * @summary Support multiple scripts for digits and decimal symbols per locale

  28  */
  29 
  30 import java.text.*;
  31 import java.util.*;
  32 
  33 public class MultipleNumberScriptTest {
  34 
  35     static Locale[] locales = {
  36         new Locale("ar"),
  37         new Locale("ar", "EG"),
  38         new Locale("ar", "DZ"),
  39         Locale.forLanguageTag("ar-EG-u-nu-arab"),
  40         Locale.forLanguageTag("ar-EG-u-nu-latn"),
  41         Locale.forLanguageTag("ar-DZ-u-nu-arab"),
  42         Locale.forLanguageTag("ar-DZ-u-nu-latn"),
  43         Locale.forLanguageTag("ee"),
  44         Locale.forLanguageTag("ee-GH"),
  45         Locale.forLanguageTag("ee-GH-u-nu-latn"),
  46         new Locale("th", "TH", "TH"),
  47         Locale.forLanguageTag("th-TH"),




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 7073852 8008577
  27  * @summary Support multiple scripts for digits and decimal symbols per locale
  28  * @run main/othervm -Djava.locale.providers=JRE,SPI MultipleNumberScriptTest
  29  */
  30 
  31 import java.text.*;
  32 import java.util.*;
  33 
  34 public class MultipleNumberScriptTest {
  35 
  36     static Locale[] locales = {
  37         new Locale("ar"),
  38         new Locale("ar", "EG"),
  39         new Locale("ar", "DZ"),
  40         Locale.forLanguageTag("ar-EG-u-nu-arab"),
  41         Locale.forLanguageTag("ar-EG-u-nu-latn"),
  42         Locale.forLanguageTag("ar-DZ-u-nu-arab"),
  43         Locale.forLanguageTag("ar-DZ-u-nu-latn"),
  44         Locale.forLanguageTag("ee"),
  45         Locale.forLanguageTag("ee-GH"),
  46         Locale.forLanguageTag("ee-GH-u-nu-latn"),
  47         new Locale("th", "TH", "TH"),
  48         Locale.forLanguageTag("th-TH"),