diff --git a/tests/cases/unittests/services/colorization.ts b/tests/cases/unittests/services/colorization.ts index 157c31fbec7..cba14ae6957 100644 --- a/tests/cases/unittests/services/colorization.ts +++ b/tests/cases/unittests/services/colorization.ts @@ -191,4 +191,22 @@ describe('Colorization', function () { assert.equal(results.finalEndOfLineState, ts.EndOfLineState.Start); }); }); + + describe("test cases for colorizing unterminted multi-line comment", function () { + it("unterminated multi-line comment correctelly", function () { + var results = getClassifications("/*", ts.EndOfLineState.Start); + + assert.equal(results.tuples.length, 1); + verifyClassification(results.tuples[0], 2, ts.TokenClass.Comment); + assert.equal(results.finalEndOfLineState, ts.EndOfLineState.InMultiLineCommentTrivia); + }); + + it("unterminated multi-line comment with trailing space correctelly", function () { + var results = getClassifications("/* ", ts.EndOfLineState.Start); + + assert.equal(results.tuples.length, 1); + verifyClassification(results.tuples[0], 3, ts.TokenClass.Comment); + assert.equal(results.finalEndOfLineState, ts.EndOfLineState.InMultiLineCommentTrivia); + }); + }); }); \ No newline at end of file