From: <svn...@os...> - 2012-05-24 09:15:24
|
Author: jive Date: 2012-05-24 02:15:12 -0700 (Thu, 24 May 2012) New Revision: 38748 Modified: trunk/modules/library/main/src/test/java/org/geotools/data/DataUtilitiesTest.java Log: Confirm fix for GEOT-330 with respect to handling of windows network shares Signed-off-by: Jody Garnett <jod...@gm...> Modified: trunk/modules/library/main/src/test/java/org/geotools/data/DataUtilitiesTest.java =================================================================== --- trunk/modules/library/main/src/test/java/org/geotools/data/DataUtilitiesTest.java 2012-05-24 02:55:23 UTC (rev 38747) +++ trunk/modules/library/main/src/test/java/org/geotools/data/DataUtilitiesTest.java 2012-05-24 09:15:12 UTC (rev 38748) @@ -184,8 +184,13 @@ handleFile("C:\\one\\two"); handleFile("C:\\one\\two\\and three"); handleFile("D:\\"); - if (TestData.isExtensiveTest()) + if (TestData.isExtensiveTest()){ handleFile("\\\\host\\share\\file"); + // from GEOT-3300 DataUtilities.urlToFile doesn't handle network paths correctly + URL url = new URL("file", "////oehhwsfs09", "/some/path/on/the/server/filename.nds"); + File windowsShareFile = DataUtilities.urlToFile( url ); + assertNotNull(windowsShareFile); + } } else { handleFile("/one"); handleFile("one"); @@ -202,6 +207,11 @@ File file = File.createTempFile("hello", "world"); handleFile(file.getAbsolutePath()); handleFile(file.getPath()); + + // from GEOT-3300 DataUtilities.urlToFile doesn't handle network paths correctly + URL url = new URL("file", "////oehhwsfs09", "/some/path/on/the/server/filename.nds"); + File windowsShareFile = DataUtilities.urlToFile( url ); + assertNotNull(windowsShareFile); } private String replaceSlashes(String string) { |