-
-
Notifications
You must be signed in to change notification settings - Fork 23
Adding unordered lists to be parsed. #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,12 +5,13 @@ | |||||
| // Created by Taylor Lineman on 8/23/23. | ||||||
| // | ||||||
|
|
||||||
| import XCTest | ||||||
| import Foundation | ||||||
| import Testing | ||||||
| @testable import SwiftHTMLtoMarkdown | ||||||
|
|
||||||
| final class BasicHTMLTests: XCTestCase { | ||||||
| final class BasicHTMLTests { | ||||||
|
|
||||||
| func testAll() throws { | ||||||
| @Test func All() throws { | ||||||
| let raw = """ | ||||||
| <h1>Heading level 1</h1> | ||||||
| <h2>Heading level 2</h2> | ||||||
|
|
@@ -27,6 +28,11 @@ final class BasicHTMLTests: XCTestCase { | |||||
|
|
||||||
| <p>This text is <em><strong>really important</strong></em>.</p> | ||||||
|
|
||||||
| <ul> | ||||||
| <li>This is the first list item</li> | ||||||
| <li>This is the second list item</li> | ||||||
| </ul> | ||||||
|
|
||||||
| <p>This is some code <code>Hello World!</code></p> | ||||||
|
|
||||||
| <pre><code><span class="hljs-attribute">Hello World</span></code></pre> | ||||||
|
|
@@ -55,6 +61,8 @@ final class BasicHTMLTests: XCTestCase { | |||||
| A*cats*meow | ||||||
|
|
||||||
| This text is ***really important***. | ||||||
| - This is the first list item | ||||||
| - This is the second list item | ||||||
|
|
||||||
| This is some code `Hello World!` | ||||||
|
|
||||||
|
|
@@ -71,10 +79,10 @@ final class BasicHTMLTests: XCTestCase { | |||||
|
|
||||||
| let markdown = try document.asMarkdown() | ||||||
| print(markdown) | ||||||
| XCTAssertTrue(markdown == correctOutput) | ||||||
| #expect(markdown == correctOutput) | ||||||
| } | ||||||
|
|
||||||
| func testHeaderLevelOne() throws { | ||||||
| @Test func HeaderLevelOne() throws { | ||||||
|
||||||
| @Test func HeaderLevelOne() throws { | |
| @Test func headerLevelOne() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func HeaderLevelTwo() throws { | |
| @Test func headerLevelTwo() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func HeaderLevelThree() throws { | |
| @Test func headerLevelThree() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func HeaderLevelFour() throws { | |
| @Test func headerLevelFour() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func HeaderLevelFive() throws { | |
| @Test func headerLevelFive() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func HeaderLevelSix() throws { | |
| @Test func headerLevelSix() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func Paragraph() throws { | |
| @Test func paragraph() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func Bold() throws { | |
| @Test func bold() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func BoldWithNoLeadingOrTrailingSpaces() throws { | |
| @Test func boldWithNoLeadingOrTrailingSpaces() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func Italicized() throws { | |
| @Test func italicized() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func ItalicizedWithNoLeadingOrTrailingSpaces() throws { | |
| @Test func italicizedWithNoLeadingOrTrailingSpaces() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func ItalicizedBoldText() throws { | |
| @Test func italicizedBoldText() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func FencedCodeBlockWithLanguage() throws { | |
| @Test func fencedCodeBlockWithLanguage() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func FencedCodeBlockWithoutLanguage() throws { | |
| @Test func fencedCodeBlockWithoutLanguage() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func Code() throws { | |
| @Test func code() throws { |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @Test func UnorderedLists() throws { | |
| @Test func unorderedLists() throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.