blob: 4f23feb08fb08e25288408049a97dbb03fcbb587 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import Testing
@testable import NorgKit
struct ArrayInlineSpanTests {
@Test func plainTextConcatenatesSpanText() {
let spans = [
InlineSpan(text: "Hello, ", styles: .bold),
InlineSpan(text: "world", styles: .italic),
InlineSpan(text: "!"),
]
#expect(spans.plainText == "Hello, world!")
}
@Test func plainTextOfEmptyArrayIsEmpty() {
#expect([InlineSpan]().plainText.isEmpty)
}
}
|