1 ' This file is part of the LibreOffice project.
3 ' This Source Code Form is subject to the terms of the Mozilla Public
4 ' License, v. 2.0. If a copy of the MPL was not distributed with this
5 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 Function doUnitTest() As String
12 verify_testConvertToFromUrl
13 doUnitTest
= TestUtil
.GetResult()
16 Sub verify_testConvertToFromUrl
17 On Error GoTo errorHandler
19 TestUtil
.AssertEqual( ConvertToUrl( ConvertFromUrl("") ), "", "ConvertToUrl( ConvertFromUrl("") )")
21 ' tdf#152917: Without the fix in place, this test would have failed with
22 ' Failed: ConvertFromUrl("file:///foo/bar/test.txt") returned , expected /foo/bar/test.txt
23 If (GetGUIType() <> 1) Then
25 TestUtil
.AssertEqual( ConvertFromUrl("file:///foo/bar/test.txt"), "/foo/bar/test.txt", "ConvertFromUrl(""file:///foo/bar/test.txt"")")
28 TestUtil
.AssertEqual( ConvertFromUrl("file://foo/bar/test.txt"), "\\foo\bar\test.txt", "ConvertFromUrl(""file://foo/bar/test.txt"")")
33 TestUtil
.ReportErrorHandler("verify_testConvertToFromUrl", Err
, Error$, Erl
)