Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Tests/MarkdownTests/Base/PlainTextConvertibleMarkupTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,14 @@ final class PlainTextConvertibleMarkupTests: XCTestCase {
let text = Text("OK")
XCTAssertEqual("OK", text.plainText)
}

func testStrikethrough() {
let strikethrough = Strikethrough(Text("Strikethrough"))
XCTAssertEqual("~Strikethrough~", strikethrough.plainText)
}

func testSymbolLink() {
let symbolLink = SymbolLink(destination: "SymbolLink")
XCTAssertEqual("``SymbolLink``", symbolLink.plainText)
}
}
15 changes: 15 additions & 0 deletions Tests/MarkdownTests/Base/RawMarkupToMarkupTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,19 @@ final class RawMarkupToMarkupTests: XCTestCase {
XCTAssertNoThrow(try Link(.link(destination: "", parsedRange: nil, [])))
XCTAssertThrowsError(try Link(.softBreak(parsedRange: nil)))
}

func testInlineAttributes() {
XCTAssertNoThrow(try InlineAttributes(.inlineAttributes(attributes: "", parsedRange: nil, [])))
XCTAssertThrowsError(try InlineAttributes(.softBreak(parsedRange: nil)))
}

func testStrikethrough() {
XCTAssertNoThrow(try Strikethrough(.strikethrough(parsedRange: nil, [])))
XCTAssertThrowsError(try Strikethrough(.softBreak(parsedRange: nil)))
}

func testSymbolLink() {
XCTAssertNoThrow(try SymbolLink(.symbolLink(parsedRange: nil, destination: nil)))
XCTAssertThrowsError(try SymbolLink(.lineBreak(parsedRange: nil)))
}
}