[Libreoffice-commits] core.git: dbaccess/qa unotest/source

Stephan Bergmann sbergman at redhat.com
Mon Feb 9 08:34:51 PST 2015


 dbaccess/qa/extras/testdocuments/fdo84315.odb.lck |binary
 dbaccess/qa/python/fdo84315.py                    |    2 +-
 unotest/source/python/org/libreoffice/unotest.py  |    5 ++++-
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 49df6e0d8c9d0ef885b0230e53d6296ce0975078
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 9 17:33:26 2015 +0100

    Adapt file URL hackery to Windows
    
    Change-Id: Icee10aae97e9bcef7a3db7e966c1c4ef6780fc1d

diff --git a/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck b/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck
new file mode 100644
index 0000000..16c4bcc
Binary files /dev/null and b/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck differ
diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index e3e2fa3..a4bbc1b 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -22,7 +22,7 @@ class Fdo84315(unittest.TestCase):
         cls._uno = UnoInProcess()
         cls._uno.setUp()
         workdir = os.environ[ "WORKDIR_FOR_BUILD" ]
-        cls._xDoc = cls._uno.openDoc(os.path.join(workdir, "CppunitTest/fdo84315.odb"))
+        cls._xDoc = cls._uno.openDoc(workdir + "/CppunitTest/fdo84315.odb")
 
     @classmethod
     def tearDownClass(cls):
diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py
index 0acf05a..28f5eca 100644
--- a/unotest/source/python/org/libreoffice/unotest.py
+++ b/unotest/source/python/org/libreoffice/unotest.py
@@ -224,7 +224,10 @@ class UnoInProcess:
         desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", self.getContext())
         props = [("Hidden", True), ("ReadOnly", False), ("AsTemplate", False)]
         loadProps = tuple([mkPropertyValue(name, value) for (name, value) in props])
-        url = "file://" + file
+        if os.name == "nt":
+            url = "file:///" + file
+        else:
+            url = "file://" + file
         self.xDoc = desktop.loadComponentFromURL(url, "_blank", 0, loadProps)
         assert(self.xDoc)
         return self.xDoc


More information about the Libreoffice-commits mailing list