2 ' This file is part of the LibreOffice project.
4 ' This Source Code Form is subject to the terms of the Mozilla Public
5 ' License, v. 2.0. If a copy of the MPL was not distributed with this
6 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 ' We link to shlwapi in many places, so safe to rely on it here
12 Declare Function PathFindExtensionA
Lib "Shlwapi" (ByVal pszPath
As String) As String
14 Function doUnitTest() As String
16 verify_testPathFindExtensionA
17 doUnitTest
= TestUtil
.GetResult()
20 Sub verify_testPathFindExtensionA()
21 On Error GoTo errorHandler
23 ' Only test on Windows
24 If (GetGUIType() <> 1) Then
25 TestUtil
.Assert(True) ' The test passed
29 ' Without the fix for tdf#147364 in place, the next call would crash in 64-bit version with
30 ' *** Exception 0xc0000005 occurred ***
31 TestUtil
.AssertEqual(PathFindExtensionA("filename.ext"), ".ext", "PathFindExtensionA(""filename.ext"")")
35 TestUtil
.ReportErrorHandler("verify_testPathFindExtensionA", Err
, Error$, Erl
)