LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / basic / qa / basic_coverage / test_filedatetime_nonexistent.bas
blob4478ba416b9d278598af2d098416d85439f5f715
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/.
7 'Bug 121337 - FileDateTime("\\nonexistent\smb\path") returns bogus result rather than throwing error
9 Option Explicit
11 Function doUnitTest as String
12 On Error GoTo ErrorHandler ' Set up error handler
13 Dim result
14 result = FileDateTime("/bogus/unix/path")
15 doUnitTest = "FAIL"
16 Exit Function
17 ErrorHandler:
18 If ( Err <> 0 ) Then
19 doUnitTest = "FAIL"
20 Else
21 doUnitTest = "OK"
22 Endif
23 End Function