diff options
author | Mickael Istria | 2018-02-22 17:05:10 +0000 |
---|---|---|
committer | Mickael Istria | 2018-02-26 09:16:09 +0000 |
commit | e92e31abc7ed83117b9cd25b4026531b4ae47064 (patch) | |
tree | bba25f17cb0e5640d5bc3a422d900ab157ae1288 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox | |
parent | 9009085b72e9507fdc4b7d0adb87883adefc5637 (diff) | |
download | rt.equinox.p2-e92e31abc7ed83117b9cd25b4026531b4ae47064.tar.gz rt.equinox.p2-e92e31abc7ed83117b9cd25b4026531b4ae47064.tar.xz rt.equinox.p2-e92e31abc7ed83117b9cd25b4026531b4ae47064.zip |
Bug 218650 - Parse the product <vm> settingI20180228-2000I20180227-2000
Change-Id: I2aa1af9333619e0a078c8b8a1e7c90960876197d
Signed-off-by: Mickael Istria <mistria@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java index 173234c25..78da7417b 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductFileTest.java @@ -17,10 +17,13 @@ import static org.junit.Assert.assertThat; import java.util.List; import java.util.Map; import junit.framework.TestCase; +import org.eclipse.core.runtime.Platform; import org.eclipse.equinox.frameworkadmin.BundleInfo; import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor; import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile; -import org.eclipse.equinox.p2.metadata.*; +import org.eclipse.equinox.p2.metadata.IVersionedId; +import org.eclipse.equinox.p2.metadata.Version; +import org.eclipse.equinox.p2.metadata.VersionedId; import org.eclipse.equinox.p2.tests.TestData; /** @@ -267,4 +270,11 @@ public class ProductFileTest extends TestCase { assertEquals("1.0", "This is the liCenSE.", product.getLicenseText().trim()); } + public void testGetVM() throws Exception { + String productWithVM = TestData.getFile("ProductActionTest", "productWithVM.product").toString(); + ProductFile product = new ProductFile(productWithVM); + assertEquals("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/OSGi%Minimum-1.2", product.getVM(Platform.OS_WIN32)); + assertEquals("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9", product.getVM(Platform.OS_LINUX)); + assertNull(product.getVM(Platform.OS_MACOSX)); + } } |