diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-06-03 09:41:05 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-06-06 10:24:20 +0200 |
commit | fbce18558a58cddf910b788a67c2f2d4d25d68e9 (patch) | |
tree | 5a5e2681abd2f6ca7d9f4eca3eed96eb8cb34190 /basic/qa | |
parent | d6752e02e3870875ced86adc04aae8e36a12cf0c (diff) |
tdf#149402 - BASIC: Don't extend comment if line ends in a whitespace
Change-Id: I8adf530e77a0e65329fa59ac2873b99f48befac4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135336
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 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/basic/qa/cppunit/test_compiler_checks.cxx b/basic/qa/cppunit/test_compiler_checks.cxx index e2882f3f694c..044977670e62 100644 --- a/basic/qa/cppunit/test_compiler_checks.cxx +++ b/basic/qa/cppunit/test_compiler_checks.cxx @@ -73,4 +73,45 @@ CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149157_vba) CPPUNIT_ASSERT(!aMacro.HasError()); } +CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149402) +{ + MacroSnippet aMacro("Function extentComment() As Integer\n" + " ' _ \n" + " If Not extentComment Then\n" + " extentComment = 1\n" + " Else\n" + " End If\n" + "End Function\n"); + aMacro.Compile(); + CPPUNIT_ASSERT(!aMacro.HasError()); +} + +CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149402_compatible) +{ + MacroSnippet aMacro("Option Compatible\n" + "Function extentComment() As Integer\n" + " ' _ \n" + " If Not extentComment Then\n" + " extentComment = 1\n" + " Else\n" + " End If\n" + "End Function\n"); + aMacro.Compile(); + CPPUNIT_ASSERT(!aMacro.HasError()); +} + +CPPUNIT_TEST_FIXTURE(CppUnit::TestFixture, testTdf149402_vba) +{ + MacroSnippet aMacro("Option VBASupport 1\n" + "Function extentComment() As Integer\n" + " ' _ \n" + " If Not extentComment Then\n" + " extentComment = 1\n" + " Else\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: */ |