Skip to content

Commit 7cd9d13

Browse files
committed
Add failing test to assert expected behaviour of multiline strings
1 parent b8ab44d commit 7cd9d13

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Tests/SwiftUserDefaultsTests/StorableXMLValueTests.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ final class StorableXMLValueTests: XCTestCase {
7878

7979
func testXMLString_string() {
8080
// FIXME: Multiline string encoding.
81-
// assertValueMatchesPlist(
82-
// """
83-
// Hello
84-
// Do newlines get escaped properly?
85-
// """
86-
// )
81+
XCTExpectFailure()
82+
83+
let multiline = """
84+
Hello,
85+
World!
86+
"""
87+
XCTAssertEqual(multiline.storableXMLValue, "<string>Hello,\\nWorld!</string>")
8788

8889
assertValueMatchesPlist("Hello, World")
8990

0 commit comments

Comments
 (0)