author | prr |
Tue, 01 Jul 2014 10:20:56 -0700 | |
changeset 25211 | 2476da7d73bf |
parent 11687 | f13cadbb0bb5 |
child 37540 | e92d95400f31 |
permissions | -rw-r--r-- |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
1 |
/* |
11679
84da476c4537
7132270: tools/launcher/DefaultLocaleTestRun.java failing (win)
ksrini
parents:
11364
diff
changeset
|
2 |
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
4 |
* |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
8 |
* |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
13 |
* accompanied this code). |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
14 |
* |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
18 |
* |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
21 |
* questions. |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
22 |
*/ |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
23 |
|
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
24 |
/* |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
25 |
* @test |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
26 |
* @bug 4958170 4891531 4989534 |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
27 |
* @summary Test to see if default java locale settings are identical |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
28 |
when launch jvm from java and javaw respectively. Test |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
29 |
should be run on Windows with different user locale and |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
30 |
system locale setting in ControlPanel's RegionSetting. |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
31 |
Following 2 testing scenarios are recommended |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
32 |
(1)systemLocale=Japanese, userLocale=English |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
33 |
(2)systemLocale=English, userLocale=Japanese |
11687
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
34 |
* @compile -XDignore.symbol.file DefaultLocaleTest.java |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
35 |
* @run main DefaultLocaleTestRun |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
36 |
*/ |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
37 |
|
11687
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
38 |
public class DefaultLocaleTestRun extends TestHelper { |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
39 |
public static void main(String... args) { |
11687
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
40 |
if (!isWindows) { |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
41 |
System.out.println("Test passes vacuously on non-windows"); |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
42 |
return; |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
43 |
} |
11687
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
44 |
TestResult tr = null; |
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
45 |
tr = doExec(javaCmd, |
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
46 |
"-cp", TEST_CLASSES_DIR.getAbsolutePath(), |
11679
84da476c4537
7132270: tools/launcher/DefaultLocaleTestRun.java failing (win)
ksrini
parents:
11364
diff
changeset
|
47 |
"DefaultLocaleTest", "-w", "x.out"); |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
48 |
System.out.println(tr.testOutput); |
11687
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
49 |
tr = doExec(javawCmd, |
f13cadbb0bb5
7127906: (launcher) convert the launcher regression tests to java
ksrini
parents:
11679
diff
changeset
|
50 |
"-cp", TEST_CLASSES_DIR.getAbsolutePath(), |
11679
84da476c4537
7132270: tools/launcher/DefaultLocaleTestRun.java failing (win)
ksrini
parents:
11364
diff
changeset
|
51 |
"DefaultLocaleTest", "-r", "x.out"); |
11364
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
52 |
System.out.println(tr.testOutput); |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
53 |
if (!tr.isOK()) { |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
54 |
throw new RuntimeException("Test failed"); |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
55 |
} |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
56 |
} |
7907324fed4f
7124443: (launcher) test DefaultsLocaleTest fails with Windows shells.
ksrini
parents:
diff
changeset
|
57 |
} |