Existing VBA tests in basic/qa/vba_tests involve a depressing amount of cut/paste coding - in particular of: Sub TestLog_ASSERT(assertion As Boolean, Optional testId As String, Optional testComment As String) ... and: Dim passCount As Integer Dim failCount As Integer Dim result As String It would be great to create two other small files for these: sharedVariables.vb testAsserts.vb And to tweak: basic/qa/cppunit/test_vba.cxx to substitute these into all the other .vb files so we have a consistent set. It'd be nice to get the OnError handling good too eg. TestLog_ASSERT (False), "hit error handler - " & Err & ": " & Error$ & " (line : " & Erl & ")" So it prints the actual error / line numbers etc. And of course the body of: Function doUnitTest() As String result = verify_win32compat() If failCount <> 0 Then doUnitTest = result Else doUnitTest = "OK" End If End Function To reduce cut/paste to the maximum =) I'd suggest using %%include sharedvariables.vb%% or somesuch syntax - you'll need to invent that, there is no pre-proc in VBA =) and impl. it in the unit test. Thanks !
Hello! I'm starting work on this bug.
Migrating Whiteboard tags to Keywords: (easyHack, difficultyBeginner, skillCpp, topicCleanup)
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
I would like to start to work on this issue.
(In reply to Marc Antoine Dumont from comment #4) > I would like to start to work on this issue. Welcome, please assign it to yourself. here is a step by step guide to help you get started: https://wiki.documentfoundation.org/Development/GetInvolved
change status
A polite ping, still working on this issue ?
Unassing, due to lack of work...if you still work on it, please assign it again.
Hello, I would like to work on this issue. I am confused about the contents that the above two mentioned files " sharedVariables.vb testAsserts.vb" will contain.
I have got this working in https://gerrit.libreoffice.org/c/core/+/107860 if someone would like to review it.
George Bateman committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/73ba462935a217a2b2d5ad296679d54f42f4b1ba tdf#84098 kill copy+paste in VBA tests It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thank you for the patch! Great work and saves a lot of time! A small question: in basic/qa/vba_tests/_test_asserts.vb there is Option VBASupport 1 and there exists a bug, where VBASupport=1 is erroneously inherited (https://bugs.documentfoundation.org/show_bug.cgi?id=132347). Do we have the same situation here, which affects all the test without VBASupport 1?
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/66b135fa80452144baf57e91a6814b172f8174e2 Related: tdf#84098 Unify tests It will be available in 7.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Andreas Heinisch from comment #12) > Thank you for the patch! Great work and saves a lot of time! > > A small question: in basic/qa/vba_tests/_test_asserts.vb there is Option > VBASupport 1 and there exists a bug, where VBASupport=1 is erroneously > inherited (https://bugs.documentfoundation.org/show_bug.cgi?id=132347). > > Do we have the same situation here, which affects all the test without > VBASupport 1? Hi Andreas, Yes the bug is relevant. If I adapt the sample in https://bugs.documentfoundation.org/show_bug.cgi?id=132347, using StrComp, then the bug appears. However all the tests in vba_tests use VBASupport 1 anyway so this is not a practical problem at the moment. George
Hi Michael Meeks, Can we call this bug fixed or is there still something to be done ?
All looks beautiful to me, lets close it - thanks Xisco =)
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a6178d172ebc47c623b1c1435d4c2e24966fce56 tdf#84098 kill copy+paste in basic/qa/basic_coverage It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.