Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2010-04-12 17:37:57 +0000
committerAndrew Niefer2010-04-12 17:37:57 +0000
commitf79eae3a74746ff8ddd071395e6c4aa3d98ddcc9 (patch)
treec1784ea5d4310e7e857a2bfd40b947764d5eb8b3 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator
parent237ebbf43ec9bfe657388abf7b77eb56206cfca6 (diff)
downloadrt.equinox.p2-f79eae3a74746ff8ddd071395e6c4aa3d98ddcc9.tar.gz
rt.equinox.p2-f79eae3a74746ff8ddd071395e6c4aa3d98ddcc9.tar.xz
rt.equinox.p2-f79eae3a74746ff8ddd071395e6c4aa3d98ddcc9.zip
bug 289544 - test bundles with %2C
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorTests.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorTests.java
index bf5d9f401..40913ec28 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorTests.java
@@ -48,4 +48,20 @@ public class SimpleConfiguratorManipulatorTests extends AbstractProvisioningTest
bundles = manipulator.loadConfiguration(new FileInputStream(infoFile), baseFile);
assertEquals(bundles[0].getLocation(), absolute);
}
+
+ public void testLocationEncoding() throws Exception {
+ File folder = getTestFolder("locationEncoding");
+ File configurationFile = new File(folder, "bundle.info");
+
+ BundleInfo[] bundles = new BundleInfo[2];
+ bundles[0] = new BundleInfo("a", "1.0.0", new File(folder, "plu%2Cins/a_1.0.0.jar").toURI(), BundleInfo.NO_LEVEL, false);
+ bundles[1] = new BundleInfo("b", "1.0.0", new File(folder, "plu,ins/b_1.0.0.jar").toURI(), BundleInfo.NO_LEVEL, false);
+
+ SimpleConfiguratorManipulator manipulator = new SimpleConfiguratorManipulatorImpl();
+ manipulator.saveConfiguration(bundles, configurationFile, folder.toURI());
+
+ bundles = manipulator.loadConfiguration(new FileInputStream(configurationFile), folder.toURI());
+ assertEquals(bundles[0].getLocation(), new File(folder, "plu%2Cins/a_1.0.0.jar").toURI());
+ assertEquals(bundles[1].getLocation(), new File(folder, "plu,ins/b_1.0.0.jar").toURI());
+ }
}

Back to the top