Debian Codegraph @

basic/qa/basic_coverage/test_non_ascii_names_compatible.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 Compatible
10 Option Explicit
11
12 Function doUnitTest as String
13 [Prüfung]
14 doUnitTest = TestUtil.GetResult()
15 End Function
16
17 Function [Функция]([😁])
18 [Функция] = [😁] & " and some text"
19 End Function
20
21 Function TestNonAscii as Integer
22 Dim Абв as Integer
23 Абв = 10
24 TestNonAscii = абв
25 End Function
26
27 Function TestNonAsciiNative as Integer
28 Dim [Абв] as Integer
29 [Абв] = 5
30 TestNonAsciiNative = [абв]
31 End Function
32
33 Sub [Prüfung]
34 On Error GoTo errorHandler
35
36 TestUtil.AssertEqual([Функция]("Smiley"), "Smiley and some text", "[Функция](""Smiley"")")
37
38 ' tdf#148358 - compare Non-ASCII variable names case-insensitive
39 TestUtil.AssertEqual(TestNonAscii(), 10, "TestNonAscii()")
40 TestUtil.AssertEqual(TestNonAsciiNative(), 5, "TestNonAsciiNative()")
41
42 Exit Sub
43 errorHandler:
44 TestUtil.ReportErrorHandler("Prüfung Compatible", Err, Error$, Erl)
45 End Sub