tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / basic / qa / basic_coverage / test_converttofromurl_methods.bas
blobc17d17e631e383cf2798ef71341219c30d36532d
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/.
8 Option Explicit
10 Function doUnitTest() As String
11 TestUtil.TestInit
12 verify_testConvertToFromUrl
13 doUnitTest = TestUtil.GetResult()
14 End Function
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
24 'Linux
25 TestUtil.AssertEqual( ConvertFromUrl("file:///foo/bar/test.txt"), "/foo/bar/test.txt", "ConvertFromUrl(""file:///foo/bar/test.txt"")")
26 Else
27 'Windows
28 TestUtil.AssertEqual( ConvertFromUrl("file://foo/bar/test.txt"), "\\foo\bar\test.txt", "ConvertFromUrl(""file://foo/bar/test.txt"")")
29 End If
31 Exit Sub
32 errorHandler:
33 TestUtil.ReportErrorHandler("verify_testConvertToFromUrl", Err, Error$, Erl)
34 End Sub