wizards/source/sfunittests/SF_UnitTest.xba | 3 ++- wizards/source/sfunittests/script.xlb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 1456ab8c9cfeb5d35a75d8a9107a35d135bf1305 Author: Jean-Pierre Ledure <j...@ledure.be> AuthorDate: Fri May 2 13:02:25 2025 +0200 Commit: Jean-Pierre Ledure <j...@ledure.be> CommitDate: Fri May 2 15:15:10 2025 +0200 ScriptForge (UnitTest) set return code Correct the code returned at the end of a test suite. A test suite is run by RunTest() and shoule return a positive return code when an assertion fails. It did not. No impact on documentation. Change-Id: Ib581515f4bd8c57d9373b67e2fffbc8850394b0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184900 Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <j...@ledure.be> diff --git a/wizards/source/sfunittests/SF_UnitTest.xba b/wizards/source/sfunittests/SF_UnitTest.xba index 6b347457baf4..da39cc54e736 100644 --- a/wizards/source/sfunittests/SF_UnitTest.xba +++ b/wizards/source/sfunittests/SF_UnitTest.xba @@ -164,7 +164,7 @@ Private _TestCase As String ' Exact name of test case currently running Private _ReturnCode As Integer ' 0 = Normal end ' 1 = Assertion failed ' 2 = Skip request (in Setup() only) - '-1 = abnormal end + ' 3 = abnormal end Private _FailedAssert As String ' Assert function that returned a failure ' Timers @@ -1255,6 +1255,7 @@ Try: If Not _ExecuteScript(_TestCase) Then GoTo Catch End If End If + iRun = _ReturnCode ' Report the end of the current test suite sRunMessage = "RUNTEST EXIT testsuite='" & LibraryName & "." & _Module & "' " & _Duration("Suite", True) diff --git a/wizards/source/sfunittests/script.xlb b/wizards/source/sfunittests/script.xlb index 3292dc12c1e7..62239503e14a 100644 --- a/wizards/source/sfunittests/script.xlb +++ b/wizards/source/sfunittests/script.xlb @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> <library:library xmlns:library="http://openoffice.org/2000/library" library:name="SFUnitTests" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="__License"/> - <library:element library:name="SF_UnitTest"/> <library:element library:name="SF_Register"/> + <library:element library:name="SF_UnitTest"/> + <library:element library:name="__License"/> </library:library> \ No newline at end of file