tdf#161411 - UI: Add Better wording for ASCII-only characters
[LibreOffice.git] / basic / qa / vba_tests / error_message.vb
blob7f960573596ade14b818899000df9f8c324eee76
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/.
9 Option VBASupport 1
10 Option Explicit
12 Function doUnitTest() As String
13 TestUtil.TestInit
14 verify_testErrorMessage
15 doUnitTest = TestUtil.GetResult()
16 End Function
18 Sub verify_testErrorMessage()
20 try: On Error Goto catch
22 a = 5
24 catch:
26 ' tdf#123144 - check for a meaningful error message
27 ' Without the fix in place, this test would have failed with
28 ' - Expected: Variable not defined.\n Additional information: a
29 ' - Actual : a
30 TestUtil.AssertEqual(Err.Description, _
31 + "Variable not defined." & Chr$(10) & "Additional information: a", _
32 + "Err.Description failure (Err.Description = " & Err.Description & ")")
34 End Sub