diff --git a/Tests/MarkdownTests/Base/PlainTextConvertibleMarkupTests.swift b/Tests/MarkdownTests/Base/PlainTextConvertibleMarkupTests.swift index 55467a5e..3faa756d 100644 --- a/Tests/MarkdownTests/Base/PlainTextConvertibleMarkupTests.swift +++ b/Tests/MarkdownTests/Base/PlainTextConvertibleMarkupTests.swift @@ -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) + } } diff --git a/Tests/MarkdownTests/Base/RawMarkupToMarkupTests.swift b/Tests/MarkdownTests/Base/RawMarkupToMarkupTests.swift index ebf9698c..c20013e1 100644 --- a/Tests/MarkdownTests/Base/RawMarkupToMarkupTests.swift +++ b/Tests/MarkdownTests/Base/RawMarkupToMarkupTests.swift @@ -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))) + } }