Added Comment component test with a number (#90)

This commit is contained in:
Artur Rymarz 2020-01-29 11:36:20 +01:00 committed by GitHub
parent eca0850b52
commit b501e834a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -135,6 +135,16 @@ final class CommentTests: SyntaxHighlighterTestCase {
.plainText("{}")
])
}
func testCommentWithNumber() {
let components = highlighter.highlight("// 1")
XCTAssertEqual(components, [
.token("//", .comment),
.whitespace(" "),
.token("1", .comment)
])
}
func testCommentWithNoWhiteSpaceToPunctuation() {
let components = highlighter.highlight("""
@ -177,6 +187,7 @@ extension CommentTests {
("testMutliLineDocumentationComment", testMutliLineDocumentationComment),
("testCommentStartingWithPunctuation", testCommentStartingWithPunctuation),
("testCommentEndingWithComma", testCommentEndingWithComma),
("testCommentWithNumber", testCommentWithNumber),
("testCommentWithNoWhiteSpaceToPunctuation", testCommentWithNoWhiteSpaceToPunctuation)
]
}