release: native macOS preview, approved graph identity, and guarded CLI failover
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import XCTest
|
||||
@testable import Mnemazine
|
||||
|
||||
final class MarkdownTests: XCTestCase {
|
||||
func testReportBlocksAndUnclosedFence() {
|
||||
let blocks = MarkdownBlock.parse("# Справка\n\nАбзац **жирный**\n\n- пункт\n> цитата\n```swift\nlet x = 1")
|
||||
XCTAssertEqual(blocks.map(\.kind), [.heading(1), .paragraph, .item, .quote, .code])
|
||||
XCTAssertEqual(blocks.last?.text, "let x = 1")
|
||||
}
|
||||
func testUnsafeLinksArePlainText() {
|
||||
let text = MarkdownBlock.inline("[плохой](file:///tmp/run.command) [сайт](https://example.com)")
|
||||
XCTAssertEqual(text.runs.compactMap(\.link), [URL(string: "https://example.com")!])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user