[Libreoffice-commits] core.git: sal/qa

Chris Sherlock chris.sherlock79 at gmail.com
Mon May 29 13:23:23 UTC 2017


 sal/qa/osl/file/osl_File.cxx |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 2220bdcbb7ba64c2ca34f8ffd8206c8a145140b6
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sun May 21 00:44:49 2017 +1000

    osl: qa test of %2F - for file URIs this is invalid
    
    Change-Id: I3871355bb4556b408504ab70194885a2084ad80b
    Reviewed-on: https://gerrit.libreoffice.org/37859
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 6b9613c6c652..a38bc3642c16 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -800,11 +800,24 @@ namespace osl_FileBase
 
     void SystemPath_FileURL::getSystemPathFromFileURL_001_21()
     {
-#if 0
+        /* From RFC3986, "2.2. Reserved Characters":
+
+           "The purpose of reserved characters is to provide a set of delimiting
+           characters that are distinguishable from other data within a URI.
+           URIs that differ in the replacement of a reserved character with its
+           corresponding percent-encoded octet are not equivalent.  Percent-
+           encoding a reserved character, or decoding a percent-encoded octet
+           that corresponds to a reserved character, will change how the URI is
+           interpreted by most applications.  Thus, characters in the reserved
+           set are protected from normalization and are therefore safe to be
+           used by scheme-specific and producer-specific algorithms for
+           delimiting data subcomponents within a URI."
+
+           In other words, %2F ("/") is NOT the same as /.
+        */
         OString sURL("%2F");
-        checkUNXBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_None, "/"); // LLA: this is may be a BUG
+        checkUNXBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_INVAL, "");
         checkWNTBehaviour_getSystemPathFromFileURL(sURL, osl::FileBase::E_INVAL, "");
-#endif
     }
 
     void SystemPath_FileURL::getSystemPathFromFileURL_001_22()


More information about the Libreoffice-commits mailing list