Index: modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/PackageTest.java
===================================================================
--- modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/PackageTest.java (revision 430228)
+++ modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/PackageTest.java (working copy)
@@ -405,8 +405,58 @@
fail("Exception during isSealed test : " + e.getMessage());
}
}
+
+ /**
+ * Tests that common info for bootstrap packages is correctly read from
+ * manifests.
+ */
+ public void test_BSPackageInfoCommon() throws Throwable {
+ Class.forName("org.apache.harmony.luni.tests.pkg1.Bogus");
+
+ Package p = Package.getPackage("org.apache.harmony.luni.tests.pkg1");
+ assertNotNull("missing resource?", p);
+ /*Specification-Title: common spec title
+ Specification-Vendor: common spec vendor
+ Specification-Version: 1.2.3
+ Implementation-Title: common impl title
+ Implementation-Version: 0.9.8
+ Implementation-Vendor: common impl vendor */
+
+ assertEquals("common spec title", p.getSpecificationTitle());
+ assertEquals("common spec vendor", p.getSpecificationVendor());
+ assertEquals("1.2.3", p.getSpecificationVersion());
+ assertEquals("common impl title", p.getImplementationTitle());
+ assertEquals("common impl vendor", p.getImplementationVendor());
+ assertEquals("0.9.8", p.getImplementationVersion());
+ }
+
/**
+ * Tests that individual bootstrap package info is correctly read from
+ * manifests.
+ */
+ public void test_BSPackageInfoSpecific() throws Throwable {
+ Class.forName("org.apache.harmony.luni.tests.pkg2.Bogus");
+
+ Package p = Package.getPackage("org.apache.harmony.luni.tests.pkg2");
+ assertNotNull("missing resource?", p);
+
+ /*Specification-Title: spec title2
+ Specification-Vendor: spec vendor2
+ Specification-Version: 1.2.3.4.5
+ Implementation-Title: impl title2
+ Implementation-Version: 0.9.8.7.6
+ Implementation-Vendor: impl vendor2*/
+
+ assertEquals("spec title2", p.getSpecificationTitle());
+ assertEquals("spec vendor2", p.getSpecificationVendor());
+ assertEquals("1.2.3.4.5", p.getSpecificationVersion());
+ assertEquals("impl title2", p.getImplementationTitle());
+ assertEquals("impl vendor2", p.getImplementationVendor());
+ assertEquals("0.9.8.7.6", p.getImplementationVersion());
+ }
+
+ /**
* Sets up the fixture, for example, open a network connection. This method
* is called before a test is executed.
*/
Index: modules/luni/build.xml
===================================================================
--- modules/luni/build.xml (revision 430228)
+++ modules/luni/build.xml (working copy)
@@ -399,6 +399,8 @@
+
+