Skip to content

Commit 2c1b859

Browse files
authored
Merge pull request #2112 from DougGregor/educational-notes-diags-generalization
Generalize educational notes documentation test to not require the ".…md" suffix
2 parents 6a8ea4c + bf1c0fa commit 2c1b859

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/SourceKitLSPTests/LocalSwiftTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,11 @@ final class LocalSwiftTests: XCTestCase {
379379
XCTAssertEqual(diags.diagnostics.count, 1)
380380
let diag = diags.diagnostics.first!
381381
XCTAssertEqual(diag.code, .string("property-wrapper-requirements"))
382-
XCTAssertEqual(diag.codeDescription?.href.fileURL?.lastPathComponent, "property-wrapper-requirements.md")
382+
let filename = diag.codeDescription?.href.fileURL?.lastPathComponent
383+
XCTAssertNotNil(filename)
384+
if let filename {
385+
XCTAssert(filename.starts(with: "property-wrapper-requirements"))
386+
}
383387
}
384388

385389
func testFixitsAreIncludedInPublishDiagnostics() async throws {

0 commit comments

Comments
 (0)