dev/null                           |binary
 sw/qa/core/data/docm/testFind.docm |binary
 sw/qa/core/macros-test.cxx         |   10 +++++-----
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 72f631977435a704008a55d3be6489ba619e3064
Author:     Hannah Meeks <hmeeks4...@gmail.com>
AuthorDate: Sat Jul 9 23:10:26 2022 +0100
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Wed Jul 13 08:32:16 2022 +0200

    add first writer vba test - for find behavior
    
    Change-Id: I25136c7954339d79521f84ad9eca79a701930fdd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136944
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/sw/qa/core/data/doc/testVba.doc b/sw/qa/core/data/doc/testVba.doc
deleted file mode 100644
index e8c87c6eec5b..000000000000
Binary files a/sw/qa/core/data/doc/testVba.doc and /dev/null differ
diff --git a/sw/qa/core/data/docm/testFind.docm 
b/sw/qa/core/data/docm/testFind.docm
new file mode 100755
index 000000000000..a0a316685b79
Binary files /dev/null and b/sw/qa/core/data/docm/testFind.docm differ
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
index 282fa5d618bf..50ca4744a761 100644
--- a/sw/qa/core/macros-test.cxx
+++ b/sw/qa/core/macros-test.cxx
@@ -107,8 +107,8 @@ void SwMacrosTest::testVba()
 {
     TestMacroInfo testInfo[] = {
         {
-            OUString("testVba.doc"),
-            
OUString("vnd.sun.Star.script:Project.NewMacros.Macro1?language=Basic&location=document")
+           OUString("testFind.docm"),
+            
OUString("vnd.sun.Star.script:Project.Module1.testFind?language=Basic&location=document")
         }
     };
     for ( size_t  i=0; i<SAL_N_ELEMENTS( testInfo ); ++i )
@@ -125,10 +125,10 @@ void SwMacrosTest::testVba()
         SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(xComponent);
 
         CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-        SfxObjectShell::CallXScript(xComponent, sUrl, aParams, aRet, 
aOutParamIndex,aOutParam);
+        CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, 
SfxObjectShell::CallXScript(xComponent, sUrl, aParams, aRet, 
aOutParamIndex,aOutParam));
         OUString aStringRes;
-        aRet >>= aStringRes;
-        // CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes);
+        CPPUNIT_ASSERT(aRet >>= aStringRes);
+        CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes);
         pFoundShell->DoClose();
     }
 }

Reply via email to