swiftgemtext

[ACTIVE] gemtext parsing in swift
git clone git://git.figbert.com/swiftgemtext.git
Log | Files | Refs | README

commit 4c10c3829fd96c9654ae06f40d0311fe2b549b16
parent 296ba858ff9f528c1f35c693da841ee380224ee8
Author: FIGBERT <figbert@figbert.com>
Date:   Tue, 20 Apr 2021 11:28:47 -0700

Update tests to add more complex links

Diffstat:
MTests/SwiftGemtextTests/SwiftGemtextTests.swift | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Tests/SwiftGemtextTests/SwiftGemtextTests.swift b/Tests/SwiftGemtextTests/SwiftGemtextTests.swift @@ -51,7 +51,9 @@ final class SwiftGemtextTests: XCTestCase { > Quote => https://google.com/ Google - => gemini://figbert.com + => /log/ This one's relative! + =>gemini://figbert.com/ + => gopher://mozz.us/ """ let manual = [ LineType.Heading(1, "One"), @@ -72,7 +74,9 @@ final class SwiftGemtextTests: XCTestCase { LineType.Quote("Quote"), LineType.EmptyLine, LineType.Link(URL(string: "https://google.com/")!, "Google"), - LineType.Link(URL(string: "gemini://figbert.com")!, nil), + LineType.Link(URL(string: "/log/")!, "This one's relative!"), + LineType.Link(URL(string: "gemini://figbert.com/")!, nil), + LineType.Link(URL(string: "gopher://mozz.us/")!, nil), ] XCTAssertEqual(manual, Gemtext(source).parse()) }