Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-10-10 15:36:15 +0000
committerJohn Arthorne2008-10-10 15:36:15 +0000
commit17425ce923718ef082f1904e015d99870011bd3b (patch)
tree392e70947453f15b22ec3194c02aaf78fa078070 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core
parent9ff05f1a2e6a1cbe6400914b901d869ce7a9ce91 (diff)
downloadrt.equinox.p2-17425ce923718ef082f1904e015d99870011bd3b.tar.gz
rt.equinox.p2-17425ce923718ef082f1904e015d99870011bd3b.tar.xz
rt.equinox.p2-17425ce923718ef082f1904e015d99870011bd3b.zip
fixed test only applicable on Windows
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/URIUtilTest.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/URIUtilTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/URIUtilTest.java
index d1247a3a0..42f69743c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/URIUtilTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/URIUtilTest.java
@@ -53,7 +53,15 @@ public class URIUtilTest extends AbstractProvisioningTest {
assertEquals("1.1", new URI("http://foo.bar/a%20b"), URIUtil.toURI(new URL("http://foo.bar/a b")));
assertEquals("1.2", new URI("http://foo.bar/a#b%20c"), URIUtil.toURI(new URL("http://foo.bar/a#b c")));
- //missing slash
+ }
+
+ /**
+ * Tests handling of Absolute file system paths on Windows incorrectly encoded as
+ * relative URIs (file:c:/tmp).
+ */
+ public void testWindowsPaths() throws MalformedURLException, URISyntaxException {
+ if (!isWindows())
+ return;
assertEquals("1.1", new URI("file:/c:/foo/bar.txt"), URIUtil.toURI(new URL("file:c:/foo/bar.txt")));
}
}

Back to the top