NetNewsWire/Frameworks/RSParser/RSParserTests/EntityDecodingTests.swift
Brent Simmons 1e90237e7e Fix bug decoding ' entities.
1. Fix typo in the entities dictionary — add the actual ' character.
2. Add EntityDecodingTests.swift and a test for this.
2017-12-30 10:24:44 -08:00

24 lines
582 B
Swift

//
// EntityDecodingTests.swift
// RSParserTests
//
// Created by Brent Simmons on 12/30/17.
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
//
import XCTest
import RSParser
class EntityDecodingTests: XCTestCase {
func test39Decoding() {
// Bug found by Manton Reece the ' entity was not getting decoded by Evergreen in JSON Feeds from micro.blog.
let s = "These are the times that try men's souls."
let decoded = s.rsparser_stringByDecodingHTMLEntities()
XCTAssertEqual(decoded, "These are the times that try men's souls.")
}
}