Skip to content

Commit f54868f

Browse files
committed
Add unit tests to check bug scenarios.
1 parent f90d62d commit f54868f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

AztecTests/TextKit/TextViewTests.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,4 +2106,14 @@ class TextViewTests: XCTestCase {
21062106
XCTAssertEqual(attributes[.foregroundColor] as! UIColor,UIColor.green)
21072107
}
21082108

2109+
func testLinksWithMultipleCharactersNonLatinDontBreak() {
2110+
let textView = TextViewStub(withHTML: "<p><a href=\"www.worpdress.com\">WordPress 워드 프레스</a></p>")
2111+
let html = textView.getHTML()
2112+
XCTAssertEqual(html, "<p><a href=\"www.worpdress.com\">WordPress 워드 프레스</a></p>")
2113+
2114+
textView.setHTML("<p><a href=\"www.worpdress.com\">WordPress</a><a href=\"www.jetpack.com\">워드 프레스</a></p>")
2115+
let htmlTwoLinks = textView.getHTML()
2116+
XCTAssertEqual(htmlTwoLinks, "<p><a href=\"www.worpdress.com\">WordPress</a><a href=\"www.jetpack.com\">워드 프레스</a></p>")
2117+
}
2118+
21092119
}

0 commit comments

Comments
 (0)