summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-02 17:23:31 +0200
committerSven Gothel <[email protected]>2012-04-02 17:23:31 +0200
commit924e2eefd99b2c93d50c19db146253c85e04fe6d (patch)
tree1cec506c776754bd2cfcc03f5691667a8f35d835 /src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
parent28814ae3946cf13619b70ddaf08c564f88252519 (diff)
Fix IOUtil: Handle all '../' and './' cases by reducing the path.
Diffstat (limited to 'src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java')
-rw-r--r--src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java b/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
index 7b8d1a4..edf1592 100644
--- a/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
+++ b/src/junit/com/jogamp/common/net/AssetURLConnectionRegisteredTest.java
@@ -46,6 +46,11 @@ public class AssetURLConnectionRegisteredTest extends AssetURLConnectionBase {
Assert.assertNotNull(url1);
Assert.assertEquals(test_asset_test3a_url, url1.toExternalForm());
testAssetConnection(url1.openConnection(), test_asset_test3_entry);
+
+ final URL url2 = IOUtil.getRelativeOf(urlConn0.getURL(), test_asset_test4_rel);
+ Assert.assertNotNull(url1);
+ Assert.assertEquals(test_asset_test4a_url, url2.toExternalForm());
+ testAssetConnection(url2.openConnection(), test_asset_test4_entry);
}
@Test
@@ -59,6 +64,11 @@ public class AssetURLConnectionRegisteredTest extends AssetURLConnectionBase {
Assert.assertNotNull(url1);
Assert.assertEquals(test_asset_test3b_url, url1.toExternalForm());
testAssetConnection(url1.openConnection(), test_asset_test3_entry);
+
+ final URL url2 = IOUtil.getRelativeOf(urlConn0.getURL(), test_asset_test4_rel);
+ Assert.assertNotNull(url1);
+ Assert.assertEquals(test_asset_test4b_url, url2.toExternalForm());
+ testAssetConnection(url2.openConnection(), test_asset_test4_entry);
}
URLConnection createAssetURLConnection(String path) throws IOException {