Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-05-03 14:06:56 +0000
committerThomas Watson2016-05-03 14:06:56 +0000
commit4667bfd93eefce14fec8340f850859a08741ee13 (patch)
treec4e1b056313d4417228b74fe15aa8e9137bf6a8b
parent77a67f124719104c4545d0b63c0c1176e579edd3 (diff)
downloadrt.equinox.framework-4667bfd93eefce14fec8340f850859a08741ee13.tar.gz
rt.equinox.framework-4667bfd93eefce14fec8340f850859a08741ee13.tar.xz
rt.equinox.framework-4667bfd93eefce14fec8340f850859a08741ee13.zip
Bug 492890 - add test for native code attributes with special filterI20160504-0035I20160503-2000
chars Change-Id: I2fcf8daf79130b1d351ffa1f549c04d8ccabf750 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
index dc65907c6..e4e05e66f 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/TestModuleContainer.java
@@ -2101,6 +2101,32 @@ public class TestModuleContainer extends AbstractTest {
}
@Test
+ public void testNativeWithFitlerChars() throws BundleException, IOException {
+ DummyContainerAdaptor adaptor = createDummyAdaptor();
+ ModuleContainer container = adaptor.getContainer();
+
+ // install the system.bundle
+ String extraCapabilities = "osgi.native; osgi.native.osname=\"Windows NT (unknown)\"";
+ Module systemBundle = installDummyModule("system.bundle.MF", Constants.SYSTEM_BUNDLE_LOCATION, Constants.SYSTEM_BUNDLE_SYMBOLICNAME, null, extraCapabilities, container);
+ ResolutionReport report = container.resolve(Arrays.asList(systemBundle), true);
+ Assert.assertNull("Failed to resolve system.bundle.", report.getResolutionException());
+
+ // install bundle with Bundle-NativeCode
+ Map<String, String> nativeCodeManifest = new HashMap<String, String>();
+ nativeCodeManifest.put(Constants.BUNDLE_MANIFESTVERSION, "2");
+ nativeCodeManifest.put(Constants.BUNDLE_SYMBOLICNAME, "importer");
+ nativeCodeManifest.put(Constants.BUNDLE_NATIVECODE, //
+ "/lib/mylib.dll; osname=\"win32\"; osname=\"Windows NT (unknown)\"," + //
+ "/lib/mylib.lib; osname=\"Linux\"");
+
+ Module nativeCodeModule = installDummyModule(nativeCodeManifest, "nativeCodeBundle", container);
+
+ // unsatisfied optional and dynamic imports do not fail a resolve.
+ report = container.resolve(Arrays.asList(nativeCodeModule), true);
+ Assert.assertNull("Failed to resolve nativeCodeBundle.", report.getResolutionException());
+ }
+
+ @Test
public void testUTF8LineContinuation() throws BundleException, IOException {
DummyContainerAdaptor adaptor = createDummyAdaptor();
ModuleContainer container = adaptor.getContainer();

Back to the top