summaryrefslogtreecommitdiff
path: root/comphelper/qa
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/qa')
-rw-r--r--comphelper/qa/unit/syntaxhighlighttest.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/comphelper/qa/unit/syntaxhighlighttest.cxx b/comphelper/qa/unit/syntaxhighlighttest.cxx
index 8fab0677d4eb..c576f7b7d85a 100644
--- a/comphelper/qa/unit/syntaxhighlighttest.cxx
+++ b/comphelper/qa/unit/syntaxhighlighttest.cxx
@@ -14,6 +14,7 @@
#include "cppunit/plugin/TestPlugIn.h"
#include "rtl/ustring.hxx"
+#include <cassert>
#include <vector>
class SyntaxHighlightTest : public CppUnit::TestFixture
@@ -45,6 +46,13 @@ void SyntaxHighlightTest::testBasicString()
prevEnd = itr->nEnd;
}
CPPUNIT_ASSERT_EQUAL(aBasicString.getLength(), prevEnd);
+
+ // The last portion is an empty comment consisting just of the leading
+ // apostrophe:
+ assert(!aPortions.empty());
+ CPPUNIT_ASSERT_EQUAL(98, aPortions.back().nBegin);
+ CPPUNIT_ASSERT_EQUAL(99, aPortions.back().nEnd);
+ CPPUNIT_ASSERT_EQUAL(TT_COMMENT, aPortions.back().tokenType);
}
CPPUNIT_TEST_SUITE_REGISTRATION(SyntaxHighlightTest);