Repository: sahandnayebaziz/Hypertext Branch: master Commit: fc367154c79a Files: 13 Total size: 27.9 KB Directory structure: gitextract_nugr38gz/ ├── .gitignore ├── .travis.sh ├── .travis.yml ├── CHANGELOG.md ├── Hypertext.podspec ├── LICENSE ├── Package.swift ├── README.md ├── Sources/ │ ├── Doctype.swift │ ├── Hypertext.swift │ └── Tags.swift └── Tests/ ├── HypertextTests/ │ └── HypertextTests.swift └── LinuxMain.swift ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore ## Build generated build/ DerivedData/ ## Various settings *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ ## Other *.moved-aside *.xcuserstate ## Obj-C/Swift specific *.hmap *.ipa *.dSYM.zip *.dSYM ## Playgrounds timeline.xctimeline playground.xcworkspace # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ .build/ # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output ================================================ FILE: .travis.sh ================================================ #!/usr/bin/env bash # adapted from https://github.com/vapor/swift/blob/master/ci echo "Hypertext Continuous Integration"; UBUNTU_RELEASE=`lsb_release -a 2>/dev/null`; if [[ $UBUNTU_RELEASE == *"15.10"* ]]; then OS="ubuntu1510"; else OS="ubuntu1404"; fi echo "Installing Dependencies" sudo apt-get install -y clang libicu-dev uuid-dev echo "Installing Swift"; if [[ $OS == "ubuntu1510" ]]; then SWIFTFILE="swift-3.0-RELEASE-ubuntu15.10"; else SWIFTFILE="swift-3.0-RELEASE-ubuntu14.04"; fi wget https://swift.org/builds/swift-3.0-release/$OS/swift-3.0-RELEASE/$SWIFTFILE.tar.gz tar -zxf $SWIFTFILE.tar.gz export PATH=$PWD/$SWIFTFILE/usr/bin:"${PATH}" echo "Version: `swift --version`"; echo "Building"; swift build if [[ $? != 0 ]]; then echo "Build failed"; exit 1; fi echo "🔎 Testing"; swift test if [[ $? != 0 ]]; then echo "Tests failed"; exit 1; fi echo "Done." ================================================ FILE: .travis.yml ================================================ os: - linux language: generic sudo: required dist: trusty osx_image: xcode8 script: - eval "$(curl -sL https://raw.githubusercontent.com/sahandnayebaziz/Hypertext/master/.travis.sh)" ================================================ FILE: CHANGELOG.md ================================================ # Changelog ## [2.1.1](https://github.com/sahandnayebaziz/Hypertext/releases/tag/2.1.1) September 22, 2017 #### Fixed - Fixed an extension that was adding a `description` property to all types that conformed to `Renderable`, instead of just to `tag`, that was causing duplication in standard types like `String` and `Int` thank you @briancprice for [#28](https://github.com/sahandnayebaziz/Hypertext/pull/28) ## [2.1.0](https://github.com/sahandnayebaziz/Hypertext/releases/tag/2.1.0) January 21st, 2017 #### Added - Custom tags now, by default, render their tags with HTML-appropriate hyphenation if given a camel case name. ```swift public class myNewTag: tag {} myNewTag().render() // ``` thank you @stupergenius for [#23](https://github.com/sahandnayebaziz/Hypertext/pull/23) ## [2.0.0](https://github.com/sahandnayebaziz/Hypertext/releases/tag/2.0.0) November 9th, 2016 #### Improved - Creating a custom tag is easier. The `name` and `isSelfClosing` attributes of `tag` have been changed to computed properties. By default, `name` takes the name of the subclass and `isSelfClosing` returns false. To override either, like we do to create the `img` tag, is simple: ```swift public class img : tag { override public var isSelfClosing: Bool { return true } } ``` thank you @Evertt for [#6](https://github.com/sahandnayebaziz/Hypertext/pull/6) - Initializing a tag with both attributes and children is easier. The order of attributes and children has been flipped so that you can set the attributes first and then set the children off the end of the initializer. Initializing a tag with both attributes and children now looks like: ```swift p(["class": "greeting"]) { "Well hello there..." } ``` thank you @Evertt for [#10](https://github.com/sahandnayebaziz/Hypertext/pull/10) - Anything that is `Renderable` now also conforms to `CustomStringConvertible` so you can print and use `tag` subclasses and your own `Renderable` types in String outputs and see them rendered automatically. thank you @Evertt for [#9](https://github.com/sahandnayebaziz/Hypertext/pull/9)/[#17](https://github.com/sahandnayebaziz/Hypertext/pull/17) - The `Renderable` protocol's method for rendering formatted, indented HTML has a new signature takes an integer value that lets you specify the number of spaces to use when indenting. ```swift func render(startingWithSpaces: Int, indentingWithSpaces: Int) -> String ``` thank you @Evertt for [#9](https://github.com/sahandnayebaziz/Hypertext/pull/9)/[#18](https://github.com/sahandnayebaziz/Hypertext/pull/18) #### Added - A new class called `doctype` that can be used to render the most common HTML doctypes. To render a doctype: ```swift doctype(.html5).render() // used in context let document: Renderable = [ doctype(.html5), html {[ head { title { "Hello there" } }, body { "blabla" } ]} ] ``` thank you @Evertt for [#16](https://github.com/sahandnayebaziz/Hypertext/pull/16) --- ## [1.0.1](https://github.com/sahandnayebaziz/Hypertext/releases/tag/1.0.1) October 31st, 2016 #### Fixed - `attributes` being optional, even though it was being initialized to an empty dictionary. It is now guaranteed to be there and still initialized empty. thank you @Evertt for [#7](https://github.com/sahandnayebaziz/Hypertext/pull/7) #### Updated - code around rendering `children` in `tag` to use the nil-coalescing operator. thank you @Evertt for [#7](https://github.com/sahandnayebaziz/Hypertext/pull/7) ================================================ FILE: Hypertext.podspec ================================================ Pod::Spec.new do |s| s.name = "Hypertext" s.version = "2.1.1" s.summary = "Compose valid HTML in Swift any way you want to." s.description = "Hypertext provides a simple, powerful set of classes for composing HTML, including all standard HTML elements, and rendering composed HTML to a string. Best used with a Swift Server." s.homepage = "https://github.com/sahandnayebaziz/Hypertext" s.license = 'MIT' s.author = { "sahandnayebaziz" => "sahand@sahand.me" } s.source = { :git => "https://github.com/sahandnayebaziz/Hypertext.git", :tag => s.version.to_s } s.ios.deployment_target = '10.0' s.osx.deployment_target = '10.12' s.source_files = 'Sources/*.swift' end ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2016 Sahand Nayebaziz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: Package.swift ================================================ import PackageDescription let package = Package( name: "Hypertext" ) ================================================ FILE: README.md ================================================ ![header](header.jpg) Compose valid HTML in Swift any way you want to. ### Usage ````swift import Hypertext title { "hello world." }.render() // hello world. head { title { "hello world." } }.render() // hello world. head { title { "hello world." } }.render(startingWithSpaces: 0, indentingWithSpaces: 2) // // // hello world. // // ```` ### Requirements - Swift 3.0+ ### Full usage 1. Rendering a tag ```swift div().render() //
``` 2. Rendering a tag with child text ```swift div { "hello world." }.render() //
hello world.
``` 3. Rendering a tag with a child tag ```swift div { img() }.render() //
``` 4. Rendering a tag with multiple child tags ```swift div { [img(), img(), img()] }.render() //
``` 5. Rendering a tag with attributes ```swift link(["rel": "stylesheet", "type":"text/css", "href":"./style.css"]).render() // ``` 6. Rendering a tag with attributes and children ```swift div(["class": "container"]) { "hello world." } //
hello world.
``` 7. Rendering a doctype declaration ```swift doctype(.html5).render() // ``` 8. Rendering unminified, with newlines and indentation ```swift head { title { "hello world." } }.render(startingWithSpaces: 0, indentingWithSpaces: 2) // // // hello world. // // ``` 9. Rendering a tag in a novel way, any way you want to ```swift func createTitleTag(forPageNamed pageName: String) -> title { return title { "Hypertext - \(pageName)" } } head { createTitleTag(forPageNamed: "Documentation") }.render() // Hypertext - Documentation ``` 10. Rendering a custom tag ```swift public class myNewTag: tag { override public var isSelfClosing: Bool { return true } } myNewTag().render() // ``` 11. Rendering a custom type by adopting the protocol `Renderable` ```swift extension MyType: Renderable { public func render() -> String { ... } public func render(startingWithSpaces: Int, indentingWithSpaces: Int) -> String { ... } } ``` ================================================ FILE: Sources/Doctype.swift ================================================ public class doctype: Renderable { public enum Doctype: String { case html5 = "" case html4Strict = "" case html4Transitional = "" case html4Frameset = "" case xhtml1Strict = "" case xhtml1Transitional = "" case xhtml1Frameset = "" case xhtml11 = "" } let docType: Doctype public var description: String { return docType.rawValue } public init(_ docType: Doctype) { self.docType = docType } } ================================================ FILE: Sources/Hypertext.swift ================================================ // // Hypertext.swift // Hypertext // // Created by Sahand Nayebaziz on 10/29/16. // Copyright © 2016 Sahand Nayebaziz. All rights reserved. // import Foundation public protocol Renderable: CustomStringConvertible { func render() -> String func render(startingWithSpaces: Int, indentingWithSpaces: Int) -> String } public extension CustomStringConvertible { public func render() -> String { return String(describing: self) } public func render(startingWithSpaces: Int, indentingWithSpaces: Int) -> String { return String(repeating: " ", count: startingWithSpaces) + render() } } extension String: Renderable {} extension Int: Renderable {} extension Double: Renderable {} extension Float: Renderable {} extension Array: Renderable { public func render() -> String { return self.reduce("") { renderedSoFar, item in guard let renderableItem = item as? Renderable else { print("Tried to render an item in an array that does not conform to Renderable.") return renderedSoFar } return renderedSoFar + renderableItem.render() } } public func render(startingWithSpaces: Int, indentingWithSpaces: Int) -> String { return self.reduce("") { renderedSoFar, item in guard let renderableItem = item as? Renderable else { print("Tried to render an item in an array that does not conform to Renderable.") return renderedSoFar } return renderedSoFar + (renderedSoFar != "" ? "\n" : "") + renderableItem.render(startingWithSpaces: startingWithSpaces, indentingWithSpaces: indentingWithSpaces) } } } enum TagFormatter { static func dashed(_ tag: String) -> String { return delimited(tag, delimiter: "-") } static func snaked(_ tag: String) -> String { return delimited(tag, delimiter: "_") } static private func delimited(_ tag: String, delimiter: String) -> String { let range = NSMakeRange(0, tag.characters.count) let pattern = "(.)(?=[A-Z])" #if !os(Linux) let regex = try! NSRegularExpression(pattern: pattern, options: []) #else let regex = try! RegularExpression(pattern: pattern, options: []) #endif return regex.stringByReplacingMatches(in: tag, options: [], range: range, withTemplate: "$1\(delimiter)").lowercased() } } open class tag: Renderable { open var isSelfClosing: Bool { return false } open var name: String { let typeName = String(describing: type(of: self)) return TagFormatter.dashed(typeName) } public var children: Renderable? = nil public var attributes: [String: String] = [:] public var description: String { return render() } public init(_ attributes: [String: String] = [:], setChildren: (() -> Renderable?) = { nil }) { self.attributes = attributes self.children = setChildren() } public func render() -> String { if isSelfClosing { return "<\(name)\(renderAttributes())/>" } else { return "<\(name)\(renderAttributes())>\(children?.render() ?? "")" } } public func render(startingWithSpaces: Int, indentingWithSpaces: Int) -> String { let leadingSpaces = String(repeating: " ", count: startingWithSpaces) if isSelfClosing { return "\(leadingSpaces)<\(name)\(renderAttributes())/>" } guard let children = children else { return "\(leadingSpaces)<\(name)\(renderAttributes())>" } return "\(leadingSpaces)<\(name)\(renderAttributes())>\("\n\(children.render(startingWithSpaces: startingWithSpaces + indentingWithSpaces, indentingWithSpaces: indentingWithSpaces))\n")\(leadingSpaces)" } private func renderAttributes() -> String { return attributes.keys.reduce("") { renderedSoFar, attributeKey in return "\(renderedSoFar) \(attributeKey)=\"\(attributes[attributeKey]!)\"" } } } ================================================ FILE: Sources/Tags.swift ================================================ // // Tags.swift // Hypertext // // Created by Sahand Nayebaziz on 10/30/16. // Copyright © 2016 Sahand Nayebaziz. All rights reserved. // public class a : tag {} public class abbr : tag {} public class address : tag {} public class article : tag {} public class aside : tag {} public class audio : tag {} public class b : tag {} public class bb : tag {} public class bdo : tag {} public class blockquote : tag {} public class body : tag {} public class button : tag {} public class canvas : tag {} public class caption : tag {} public class cite : tag {} public class code : tag {} public class colgroup : tag {} public class datagrid : tag {} public class datalist : tag {} public class dd : tag {} public class del : tag {} public class detail : tag {} public class dfn : tag {} public class dialog : tag {} public class div : tag {} public class dl : tag {} public class em : tag {} public class fieldset : tag {} public class figure : tag {} public class footer : tag {} public class form : tag {} public class h1 : tag {} public class h2 : tag {} public class h3 : tag {} public class h4 : tag {} public class h5 : tag {} public class h6 : tag {} public class head : tag {} public class header : tag {} public class html : tag {} public class i : tag {} public class iframe : tag {} public class ins : tag {} public class kbd : tag {} public class label : tag {} public class legend : tag {} public class li : tag {} public class map : tag {} public class mark : tag {} public class menu : tag {} public class meter : tag {} public class nav : tag {} public class noscript : tag {} public class object : tag {} public class ol : tag {} public class optgroup : tag {} public class option : tag {} public class output : tag {} public class p : tag {} public class pre : tag {} public class progress : tag {} public class q : tag {} public class rp : tag {} public class rt : tag {} public class ruby : tag {} public class samp : tag {} public class script : tag {} public class section : tag {} public class select : tag {} public class small : tag {} public class span : tag {} public class strong : tag {} public class style : tag {} public class sub : tag {} public class sup : tag {} public class table : tag {} public class tbody : tag {} public class td : tag {} public class textarea : tag {} public class tfoot : tag {} public class th : tag {} public class thead : tag {} public class time : tag {} public class title : tag {} public class tr : tag {} public class ul : tag {} public class `var` : tag {} public class video : tag {} public class area : tag { override public var isSelfClosing: Bool { return true } } public class base : tag { override public var isSelfClosing: Bool { return true } } public class br : tag { override public var isSelfClosing: Bool { return true } } public class col : tag { override public var isSelfClosing: Bool { return true } } public class command : tag { override public var isSelfClosing: Bool { return true } } public class dt : tag { override public var isSelfClosing: Bool { return true } } public class embed : tag { override public var isSelfClosing: Bool { return true } } public class hr : tag { override public var isSelfClosing: Bool { return true } } public class img : tag { override public var isSelfClosing: Bool { return true } } public class input : tag { override public var isSelfClosing: Bool { return true } } public class link : tag { override public var isSelfClosing: Bool { return true } } public class meta : tag { override public var isSelfClosing: Bool { return true } } public class param : tag { override public var isSelfClosing: Bool { return true } } public class source : tag { override public var isSelfClosing: Bool { return true } } ================================================ FILE: Tests/HypertextTests/HypertextTests.swift ================================================ import XCTest @testable import Hypertext //MARK: Test Tags class materialButton: tag {} class camelButton: tag { override public var name: String { return String(describing: type(of: self)) } } //MARK: Test Cases class HypertextTests: XCTestCase { func testCanRenderString() { let expected = "hello world." let actual = "hello world.".render() XCTAssertEqual(expected, actual) } func testCanRenderIntRenderable() { let expected = "
2
" let actual = div { 2 }.render() XCTAssertEqual(expected, actual) } func testCanRenderDoubleRenderable() { let expected = "
2.0
" let actual = div { 2.0 }.render() XCTAssertEqual(expected, actual) } func testCanRenderFloatRenderable() { let expected = "
2.0
" let actual = div { Float(2.0) }.render() XCTAssertEqual(expected, actual) } func testCanRenderTag() { let expected = "" let actual = title().render() XCTAssertEqual(expected, actual) } func testCanRenderSelfClosingTag() { let expected = "" let actual = img().render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithStringChild() { let expected = "hello world." let actual = title { "hello world." }.render() XCTAssertEqual(expected, actual) } func testCanRenderSelfClosingTagWithoutRenderingChild() { let expected = "" let actual = img { "hello world." }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithChildTag() { let expected = "
" let actual = div { img() }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithMultipleChildTags() { let expected = "
" let actual = div { [img(), img(), img()] }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithChildWithNestedChild() { let expected = "
" let actual = div { div { img() } }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithChildWithNestedChildAbusingRender() { let expected = "
" let actual = div { div { img().render() }.render() }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithManyNestedChildren() { let expected = "
" let actual = div { div { div { div { div { div { div { div() } } } } } } }.render() XCTAssertEqual(expected, actual) } func testCanRenderAttributeOnTag() { let expected = "" let actual = link(["href":"./style.css"]).render() XCTAssertEqual(expected, actual) } func testCanRenderAttributeOnNestedTag() { let expected = "" let actual = head { link(["href":"./style.css"]) }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagWithAttributesAndChildren() { let expected = "

Well hello there...

" let actual = div(["class":"container"]) { p { "Well hello there..." } }.render() XCTAssertEqual(expected, actual) } func testCanRenderTagsWithFormatting() { let expected = "\n \n hello world.\n \n" let actual = head { title { "hello world." } }.render(startingWithSpaces: 0, indentingWithSpaces: 2) XCTAssertEqual(expected, actual) let expectedFourSpaces = "\n \n hello world.\n \n" let actualFourSpaces = head { title { "hello world." } }.render(startingWithSpaces: 0, indentingWithSpaces: 4) XCTAssertEqual(expectedFourSpaces, actualFourSpaces) } func testCanRenderTagsWithFormattingWithMultipleSiblings() { let expected = "
\n \n \n \n

\n
" let actual = div { [ img(), img(), img(), h1() ] }.render(startingWithSpaces: 0, indentingWithSpaces: 2) XCTAssertEqual(expected, actual) } func testCanCreateCustomTagWithOverridenName() { let expected = "" class mycustomtag : tag { override public var name: String { return "mycustomtagname" } } let actual = mycustomtag().render() XCTAssertEqual(expected, actual) } func testCanDescribeTagAsCustomStringConvertible() { let expected = "
hello world.
" let actual = "\(div { "hello world." })" XCTAssertEqual(expected, actual) } func testCanRenderDoctype() { let expected = "" let actual = doctype(.html5).render() XCTAssertEqual(expected, actual) let expectedHtml4 = "" let actualHtml4 = doctype(.html4Strict).render() XCTAssertEqual(expectedHtml4, actualHtml4) } func testSnakeDelimiter() { let expected = "material_button" let actual = TagFormatter.snaked("materialButton") XCTAssertEqual(expected, actual) let expectedNoOp = "materialbutton" let actualNoOp = TagFormatter.snaked("materialbutton") XCTAssertEqual(expectedNoOp, actualNoOp) } func testDashDelimiter() { let expected = "material-button" let actual = TagFormatter.dashed("materialButton") XCTAssertEqual(expected, actual) let expectedNoOp = "materialbutton" let actualNoOp = TagFormatter.dashed("materialbutton") XCTAssertEqual(expectedNoOp, actualNoOp) } func testDefaultTagFormatIsDashed() { let expected = "" let actual = materialButton().render() XCTAssertEqual(expected, actual) } func testCanOverrideDefaultTagFormat() { let expected = "" let actual = camelButton().render() XCTAssertEqual(expected, actual) } static var allTests : [(String, (HypertextTests) -> () throws -> Void)] { return [ ("testCanRenderString", testCanRenderString), ("testCanRenderIntRenderable", testCanRenderIntRenderable), ("testCanRenderDoubleRenderable", testCanRenderDoubleRenderable), ("testCanRenderFloatRenderable", testCanRenderFloatRenderable), ("testCanRenderTag", testCanRenderTag), ("testCanRenderSelfClosingTag", testCanRenderSelfClosingTag), ("testCanRenderTagWithStringChild", testCanRenderTagWithStringChild), ("testCanRenderSelfClosingTagWithoutRenderingChild", testCanRenderSelfClosingTagWithoutRenderingChild), ("testCanRenderTagWithChildTag", testCanRenderTagWithChildTag), ("testCanRenderTagWithMultipleChildTags", testCanRenderTagWithMultipleChildTags), ("testCanRenderTagWithChildWithNestedChild", testCanRenderTagWithChildWithNestedChild), ("testCanRenderTagWithChildWithNestedChildAbusingRender", testCanRenderTagWithChildWithNestedChildAbusingRender), ("testCanRenderTagWithManyNestedChildren", testCanRenderTagWithManyNestedChildren), ("testCanRenderAttributeOnTag", testCanRenderAttributeOnTag), ("testCanRenderAttributeOnNestedTag", testCanRenderAttributeOnNestedTag), ("testCanRenderTagsWithFormatting", testCanRenderTagsWithFormatting), ("testCanRenderTagsWithFormattingWithMultipleSiblings", testCanRenderTagsWithFormattingWithMultipleSiblings), ("testCanCreateCustomTagWithOverridenName", testCanCreateCustomTagWithOverridenName), ("testCanRenderTagWithAttributesAndChildren", testCanRenderTagWithAttributesAndChildren), ("testCanDescribeTagAsCustomStringConvertible", testCanDescribeTagAsCustomStringConvertible), ("testCanRenderDoctype", testCanRenderDoctype), ("testSnakeDelimiter", testSnakeDelimiter), ("testDashDelimiter", testDashDelimiter), ("testDefaultTagFormatIsDashed", testDefaultTagFormatIsDashed), ("testCanOverrideDefaultTagFormat", testCanOverrideDefaultTagFormat) ] } } ================================================ FILE: Tests/LinuxMain.swift ================================================ import XCTest @testable import HypertextTests XCTMain([ testCase(HypertextTests.allTests), ])