From d6a32d2f0cb8ebf1fcb4111aa0d00192204d4832 Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Sun, 15 Dec 2024 12:32:36 +0100 Subject: [PATCH] Added Visual Basic function list + unittest case Fix #3239, close #15953 --- PowerEditor/Test/FunctionList/vb/unitTest | 15 ++++++ .../FunctionList/vb/unitTest.expected.result | 1 + PowerEditor/installer/functionList/vb.xml | 50 +++++++++++++++++++ .../installer/nsisInclude/functionList.nsh | 9 ++++ 4 files changed, 75 insertions(+) create mode 100644 PowerEditor/Test/FunctionList/vb/unitTest create mode 100644 PowerEditor/Test/FunctionList/vb/unitTest.expected.result create mode 100644 PowerEditor/installer/functionList/vb.xml diff --git a/PowerEditor/Test/FunctionList/vb/unitTest b/PowerEditor/Test/FunctionList/vb/unitTest new file mode 100644 index 000000000..2e5fc2fd3 --- /dev/null +++ b/PowerEditor/Test/FunctionList/vb/unitTest @@ -0,0 +1,15 @@ +Module Program + Public num1 As Integer + Public num2 As Integer + Public answer As Integer + Sub Main(args As String()) + Console.Write("Type a number and press Enter") + num1 = Console.ReadLine() + Console.Write("Type another number to add to it and press Enter") + num2 = Console.ReadLine() + answer = num1 + num2 + Console.WriteLine("The answer is " & answer) + Console.Write("Press any key to continue...") + Console.ReadKey(True) + End Sub +End Module \ No newline at end of file diff --git a/PowerEditor/Test/FunctionList/vb/unitTest.expected.result b/PowerEditor/Test/FunctionList/vb/unitTest.expected.result new file mode 100644 index 000000000..99c319269 --- /dev/null +++ b/PowerEditor/Test/FunctionList/vb/unitTest.expected.result @@ -0,0 +1 @@ +{"leaves":["Main"],"root":"unitTest"} diff --git a/PowerEditor/installer/functionList/vb.xml b/PowerEditor/installer/functionList/vb.xml new file mode 100644 index 000000000..bec6621df --- /dev/null +++ b/PowerEditor/installer/functionList/vb.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/installer/nsisInclude/functionList.nsh b/PowerEditor/installer/nsisInclude/functionList.nsh index 1aeec4a5b..ff911853c 100644 --- a/PowerEditor/installer/nsisInclude/functionList.nsh +++ b/PowerEditor/installer/nsisInclude/functionList.nsh @@ -218,6 +218,11 @@ SectionGroup "Function List Files" functionListComponent File ".\functionList\latex.xml" ${MementoSectionEnd} + ${MementoSection} "VisualBasic" VB_FL + SetOutPath "$INSTDIR\functionList" + File ".\functionList\vb.xml" + ${MementoSectionEnd} + ${MementoSection} "NppExecScript" NppExecScript_FL SetOutPath "$INSTDIR\functionList" File ".\functionList\nppexec.xml" @@ -397,6 +402,10 @@ SectionGroup un.functionListComponent Delete "$INSTDIR\functionList\latex.xml" SectionEnd + Section un.VB_FL + Delete "$INSTDIR\functionList\vb.xml" + SectionEnd + Section un.NppExecScript_FL Delete "$INSTDIR\functionList\nppexec.xml" SectionEnd