29 should be run on Windows with different user locale and |
29 should be run on Windows with different user locale and |
30 system locale setting in ControlPanel's RegionSetting. |
30 system locale setting in ControlPanel's RegionSetting. |
31 Following 2 testing scenarios are recommended |
31 Following 2 testing scenarios are recommended |
32 (1)systemLocale=Japanese, userLocale=English |
32 (1)systemLocale=Japanese, userLocale=English |
33 (2)systemLocale=English, userLocale=Japanese |
33 (2)systemLocale=English, userLocale=Japanese |
34 * @compile -XDignore.symbol.file DefaultLocaleTest.java TestHelper.java |
34 * @compile -XDignore.symbol.file DefaultLocaleTest.java |
35 * @run main DefaultLocaleTestRun |
35 * @run main DefaultLocaleTestRun |
36 */ |
36 */ |
37 |
37 |
38 public class DefaultLocaleTestRun { |
38 public class DefaultLocaleTestRun extends TestHelper { |
39 public static void main(String... args) { |
39 public static void main(String... args) { |
40 if (!TestHelper.isWindows) { |
40 if (!isWindows) { |
41 System.out.println("Test passes vacuously on non-windows"); |
41 System.out.println("Test passes vacuously on non-windows"); |
42 return; |
42 return; |
43 } |
43 } |
44 TestHelper.TestResult tr = null; |
44 TestResult tr = null; |
45 tr = TestHelper.doExec(TestHelper.javaCmd, |
45 tr = doExec(javaCmd, |
46 "-cp", TestHelper.TEST_CLASSES_DIR.getAbsolutePath(), |
46 "-cp", TEST_CLASSES_DIR.getAbsolutePath(), |
47 "DefaultLocaleTest", "-w", "x.out"); |
47 "DefaultLocaleTest", "-w", "x.out"); |
48 System.out.println(tr.testOutput); |
48 System.out.println(tr.testOutput); |
49 tr = TestHelper.doExec(TestHelper.javawCmd, |
49 tr = doExec(javawCmd, |
50 "-cp", TestHelper.TEST_CLASSES_DIR.getAbsolutePath(), |
50 "-cp", TEST_CLASSES_DIR.getAbsolutePath(), |
51 "DefaultLocaleTest", "-r", "x.out"); |
51 "DefaultLocaleTest", "-r", "x.out"); |
52 System.out.println(tr.testOutput); |
52 System.out.println(tr.testOutput); |
53 if (!tr.isOK()) { |
53 if (!tr.isOK()) { |
54 throw new RuntimeException("Test failed"); |
54 throw new RuntimeException("Test failed"); |
55 } |
55 } |