Skip to content

Commit ed9ac9e

Browse files
committed
Add tests.
1 parent c90813a commit ed9ac9e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Tests/SourceKitLSPTests/LocalSwiftTests.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,16 @@ final class LocalSwiftTests: XCTestCase {
818818
819819
---
820820
821+
""")
822+
XCTAssertEqual(try! xmlDocumentationToMarkdown("""
823+
<Link href="https://example.com">My Link</Link>
824+
"""), """
825+
[My Link](https://example.com)
826+
""")
827+
XCTAssertEqual(try! xmlDocumentationToMarkdown("""
828+
<Link>My Invalid Link</Link>
829+
"""), """
830+
My Invalid Link
821831
""")
822832
XCTAssertEqual(try! xmlDocumentationToMarkdown("""
823833
<Declaration>func replacingOccurrences&lt;Target, Replacement&gt;(of target: Target, with replacement: Replacement, options: <Type usr="s:SS">String</Type>.<Type usr="s:SS10FoundationE14CompareOptionsa">CompareOptions</Type> = default, range searchRange: <Type usr="s:Sn">Range</Type>&lt;<Type usr="s:SS">String</Type>.<Type usr="s:SS5IndexV">Index</Type>&gt;? = default) -&gt; <Type usr="s:SS">String</Type> where Target : <Type usr="s:Sy">StringProtocol</Type>, Replacement : <Type usr="s:Sy">StringProtocol</Type></Declaration>

0 commit comments

Comments
 (0)