Debian Codegraph @

basic/qa/basic_coverage/test_tdf165420.bas

raw
1 '
2 ' This file is part of the LibreOffice project.
3 '
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/.
7 '
8
9 Option Explicit
10
11 Function doUnitTest() As String
12 TestUtil.TestInit
13 verify_tdf165420()
14 doUnitTest = TestUtil.GetResult()
15 End Function
16
17 Sub verify_tdf165420()
18 On Error GoTo errorHandler
19
20 Dim nHandlerInvocations As Integer
21
22 ' Calling 'Shell' function with an empty argument must not crash
23 Shell(Empty)
24 Shell("")
25 Shell(" ")
26
27 TestUtil.AssertEqual(nHandlerInvocations, 3, "nHandlerInvocations")
28
29 Exit Sub
30
31 errorHandler:
32 TestUtil.AssertEqual(Err, 5, "Err") ' Expected: Invalid procedure call
33 nHandlerInvocations = nHandlerInvocations + 1
34 Resume Next
35 End Sub