// // FeedlyTextSanitizationTests.swift // AccountTests // // Created by Kiel Gillard on 29/1/20. // Copyright © 2020 Ranchero Software, LLC. All rights reserved. // import XCTest @testable import Account class FeedlyTextSanitizationTests: XCTestCase { func testRTLSanitization() { let targetsAndExpectations: [(target: String?, expectation: String?)] = [ (nil, nil), ("", ""), (" ", " "), ("text", "text"), ("
", "
"), ("
", "
"), ("
text", "
text"), ("text
", "text
"), ("
", ""), ("
", "
"), ("
", "
"), ("
text
", "text"), ] let sanitizer = FeedlyRTLTextSanitizer() for (target, expectation) in targetsAndExpectations { let calculated = sanitizer.sanitize(target) XCTAssertEqual(expectation, calculated) } } }