diff options
author | Zufu Liu <unknown> | 2021-07-03 12:59:39 +1000 |
---|---|---|
committer | Zufu Liu <unknown> | 2021-07-03 12:59:39 +1000 |
commit | 9cda372c64c8920d2e910825161a8ed882b417b3 (patch) | |
tree | ef5ed7a0110c22327c6bb09d3f6b481ddfa83284 /test | |
parent | 4a34a1f59a443403844c437d6d6a61c7a8019822 (diff) | |
download | scintilla-mirror-9cda372c64c8920d2e910825161a8ed882b417b3.tar.gz |
Feature [feature-requests:#1408] Use positive IsDBCSTrailByteNoExcept function
instead of negated IsDBCSTrailByteInvalid.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/testDocument.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/testDocument.cxx b/test/unit/testDocument.cxx index cc6255caa..cecd14920 100644 --- a/test/unit/testDocument.cxx +++ b/test/unit/testDocument.cxx @@ -120,4 +120,16 @@ TEST_CASE("Document") { REQUIRE(width == 1); REQUIRE(ch == '='); } + + SECTION("CheckTrailBytes") { + Document doc(DocumentOption::Default); + const int pages[] = { 932, 936, 949, 950, 1361 }; + for (const int page : pages) { + doc.SetDBCSCodePage(page); + for (int byteVal = 0; byteVal < 0x100; byteVal++) { + char ch = static_cast<char>(byteVal); + REQUIRE(doc.IsDBCSTrailByteNoExcept(ch) != doc.IsDBCSTrailByteInvalid(ch)); + } + } + } } |