--- a/jdk/test/java/util/Locale/LocaleProviders.java Mon Oct 15 22:34:35 2012 +0100
+++ b/jdk/test/java/util/Locale/LocaleProviders.java Tue Oct 16 10:59:21 2012 -0700
@@ -47,6 +47,10 @@
bug7198834Test();
break;
+ case "tzNameTest":
+ tzNameTest(args[1]);
+ break;
+
default:
throw new RuntimeException("Test method '"+methodName+"' not found.");
}
@@ -81,4 +85,12 @@
System.out.println("Windows HOST locale adapter not found. Ignoring this test.");
}
}
+
+ static void tzNameTest(String id) {
+ TimeZone tz = TimeZone.getTimeZone(id);
+ String tzName = tz.getDisplayName(false, TimeZone.SHORT, Locale.US);
+ if (tzName.startsWith("GMT")) {
+ throw new RuntimeException("JRE's localized time zone name for "+id+" could not be retrieved. Returned name was: "+tzName);
+ }
+ }
}