From 0a72b799718a17b0ea49dc36d974da28000fc952 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sat, 20 May 2017 18:17:13 +1000 Subject: tdf#107968 - double slash handling misleading; add unit test Change-Id: Ide52926eff56065e7368615338ea33dcb2f87c62 Reviewed-on: https://gerrit.libreoffice.org/37850 Tested-by: Jenkins Reviewed-by: Chris Sherlock --- sal/qa/osl/file/osl_File.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sal/qa/osl/file/osl_File.cxx') diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 4e635a1d559f..7176885dbbae 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -611,6 +611,7 @@ namespace osl_FileBase void getFileURLFromSystemPath_002(); void getFileURLFromSystemPath_003(); void getFileURLFromSystemPath_004(); + void getFileURLFromSystemPath_004_1(); void getFileURLFromSystemPath_005(); CPPUNIT_TEST_SUITE(SystemPath_FileURL); @@ -641,6 +642,7 @@ namespace osl_FileBase CPPUNIT_TEST(getFileURLFromSystemPath_002); CPPUNIT_TEST(getFileURLFromSystemPath_003); CPPUNIT_TEST(getFileURLFromSystemPath_004); + CPPUNIT_TEST(getFileURLFromSystemPath_004_1); CPPUNIT_TEST(getFileURLFromSystemPath_005); CPPUNIT_TEST_SUITE_END(); @@ -1017,6 +1019,13 @@ namespace osl_FileBase checkWNTBehaviour_getFileURLFromSystemPath(sSysPath, osl::FileBase::E_INVAL, ""); } + void SystemPath_FileURL::getFileURLFromSystemPath_004_1() + { + OString sSysPath("/tmp///first start"); + checkUNXBehaviour_getFileURLFromSystemPath(sSysPath, osl::FileBase::E_None, "file:///tmp/first%20start"); + checkWNTBehaviour_getFileURLFromSystemPath(sSysPath, osl::FileBase::E_INVAL, ""); + } + void SystemPath_FileURL::getFileURLFromSystemPath_005() { OString sSysPath(""); -- cgit