From 501fdce29e4d2c46c4708ad7f44056878e0db3fa Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Tue, 16 Jun 2026 12:08:21 +0200 Subject: Initial extraction from Norganize --- .../Extensions/Array+InlineSpanTests.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Tests/NorgKitTests/Extensions/Array+InlineSpanTests.swift (limited to 'Tests/NorgKitTests/Extensions') diff --git a/Tests/NorgKitTests/Extensions/Array+InlineSpanTests.swift b/Tests/NorgKitTests/Extensions/Array+InlineSpanTests.swift new file mode 100644 index 0000000..4f23feb --- /dev/null +++ b/Tests/NorgKitTests/Extensions/Array+InlineSpanTests.swift @@ -0,0 +1,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) + } +} -- cgit