diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-05-25 12:42:23 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-05-31 12:30:21 +0200 |
commit | b94275f6d2cb4dc28d1563fd7994251042b6d51a (patch) | |
tree | 05297b6bd67ce56cbcc18e52eec9535c346ca2d5 /basic/qa | |
parent | 7d25b8544b1534e8a413422ba0bf91d1b2af85a5 (diff) |
tdf#149157 - Break multiline continuation in a comment after a new line
Change-Id: I3dd875152a6f2cfafb67f13f597c36f01a4759b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135018
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'basic/qa')
-rw-r--r-- | basic/qa/cppunit/test_compiler_checks.cxx | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/basic/qa/cppunit/test_compiler_checks.cxx b/basic/qa/cppunit/test_compiler_checks.cxx index 24b380ed2a9a..e2882f3f694c 100644 --- a/basic/qa/cppunit/test_compiler_checks.cxx +++ b/basic/qa/cppunit/test_compiler_checks.cxx @@ -33,4 +33,44 @@ CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testDoubleArgument) CPPUNIT_ASSERT_EQUAL(ERRCODE_BASIC_VAR_DEFINED, aMacro.getError().StripDynamic()); } +CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149157) +{ + MacroSnippet aMacro("Function extentComment() As Integer\n" + " ' _\n" + " If Not extentComment Then\n" + " extentComment = 1\n" + " End If\n" + "End Function\n"); + aMacro.Compile(); + CPPUNIT_ASSERT(!aMacro.HasError()); +} + +CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149157_compatible) +{ + MacroSnippet aMacro("Option Compatible\n" + "Function extentComment() As Integer\n" + " ' _\n" + "\n" + " If Not extentComment Then\n" + " extentComment = 1\n" + " End If\n" + "End Function\n"); + aMacro.Compile(); + CPPUNIT_ASSERT(!aMacro.HasError()); +} + +CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149157_vba) +{ + MacroSnippet aMacro("Option VBASupport 1\n" + "Function extentComment() As Integer\n" + " ' _\n" + "\n" + " If Not extentComment Then\n" + " extentComment = 1\n" + " End If\n" + "End Function\n"); + aMacro.Compile(); + CPPUNIT_ASSERT(!aMacro.HasError()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |