7 # under the terms of the GNU General Public License version 2 only, as
8 # published by the Free Software Foundation.
9 #
10 # This code is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # version 2 for more details (a copy is included in the LICENSE file that
14 # accompanied this code).
15 #
16 # You should have received a copy of the GNU General Public License version
17 # 2 along with this work; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 # or visit www.oracle.com if you need additional information or have any
22 # questions.
23 #
24 #
25 # @test
26 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
27 # 8013086 8013233 8013903 8015960 8028771
28 # @summary tests for "java.locale.providers" system property
29 # @compile -XDignore.symbol.file LocaleProviders.java
30 # @run shell/timeout=600 LocaleProviders.sh
31
32 if [ "${TESTSRC}" = "" ]
33 then
34 echo "TESTSRC not set. Test cannot execute. Failed."
35 exit 1
36 fi
37 echo "TESTSRC=${TESTSRC}"
38 if [ "${TESTJAVA}" = "" ]
39 then
40 echo "TESTJAVA not set. Test cannot execute. Failed."
41 exit 1
42 fi
43 if [ "${COMPILEJAVA}" = "" ]
44 then
45 COMPILEJAVA="${TESTJAVA}"
46 fi
47 echo "TESTJAVA=${TESTJAVA}"
146 echo "Execution successful"
147 else
148 echo "Execution of the test case failed."
149 exit $result
150 fi
151 }
152
153 # testing HOST is selected for the default locale, if specified on Windows or MacOSX
154 METHODNAME=adapterTest
155 PREFLIST=HOST,JRE
156 case "$OS" in
157 Windows_NT* )
158 WINVER=`uname -r`
159 if [ "${WINVER}" = "5" ]
160 then
161 PARAM1=JRE
162 else
163 PARAM1=HOST
164 fi
165 ;;
166 CYGWIN_NT-6* | Darwin )
167 PARAM1=HOST
168 ;;
169 * )
170 PARAM1=JRE
171 ;;
172 esac
173 PARAM2=${DEFLANG}
174 PARAM3=${DEFCTRY}
175 runTest
176
177 # testing HOST is NOT selected for the non-default locale, if specified
178 METHODNAME=adapterTest
179 PREFLIST=HOST,JRE
180 PARAM1=JRE
181 # Try to find the locale JRE supports which is not the platform default (HOST supports that one)
182 if [ "${DEFLANG}" != "en" ] && [ "${DEFFMTLANG}" != "en" ]; then
183 PARAM2=en
184 PARAM3=US
185 elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then
186 PARAM2=ja
|
7 # under the terms of the GNU General Public License version 2 only, as
8 # published by the Free Software Foundation.
9 #
10 # This code is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 # version 2 for more details (a copy is included in the LICENSE file that
14 # accompanied this code).
15 #
16 # You should have received a copy of the GNU General Public License version
17 # 2 along with this work; if not, write to the Free Software Foundation,
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 #
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 # or visit www.oracle.com if you need additional information or have any
22 # questions.
23 #
24 #
25 # @test
26 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
27 # 8013086 8013233 8013903 8015960 8028771 8150432
28 # @summary tests for "java.locale.providers" system property
29 # @compile -XDignore.symbol.file LocaleProviders.java
30 # @run shell/timeout=600 LocaleProviders.sh
31
32 if [ "${TESTSRC}" = "" ]
33 then
34 echo "TESTSRC not set. Test cannot execute. Failed."
35 exit 1
36 fi
37 echo "TESTSRC=${TESTSRC}"
38 if [ "${TESTJAVA}" = "" ]
39 then
40 echo "TESTJAVA not set. Test cannot execute. Failed."
41 exit 1
42 fi
43 if [ "${COMPILEJAVA}" = "" ]
44 then
45 COMPILEJAVA="${TESTJAVA}"
46 fi
47 echo "TESTJAVA=${TESTJAVA}"
146 echo "Execution successful"
147 else
148 echo "Execution of the test case failed."
149 exit $result
150 fi
151 }
152
153 # testing HOST is selected for the default locale, if specified on Windows or MacOSX
154 METHODNAME=adapterTest
155 PREFLIST=HOST,JRE
156 case "$OS" in
157 Windows_NT* )
158 WINVER=`uname -r`
159 if [ "${WINVER}" = "5" ]
160 then
161 PARAM1=JRE
162 else
163 PARAM1=HOST
164 fi
165 ;;
166 CYGWIN_NT-6* | CYGWIN_NT-10* | Darwin )
167 PARAM1=HOST
168 ;;
169 * )
170 PARAM1=JRE
171 ;;
172 esac
173 PARAM2=${DEFLANG}
174 PARAM3=${DEFCTRY}
175 runTest
176
177 # testing HOST is NOT selected for the non-default locale, if specified
178 METHODNAME=adapterTest
179 PREFLIST=HOST,JRE
180 PARAM1=JRE
181 # Try to find the locale JRE supports which is not the platform default (HOST supports that one)
182 if [ "${DEFLANG}" != "en" ] && [ "${DEFFMTLANG}" != "en" ]; then
183 PARAM2=en
184 PARAM3=US
185 elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then
186 PARAM2=ja
|