We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d22de9 commit fe3599dCopy full SHA for fe3599d
SocketIO-MacTests/SocketEngineTest.swift
@@ -74,4 +74,18 @@ class SocketEngineTest: XCTestCase {
74
engine.parseEngineMessage("afafafda", fromPolling: false)
75
waitForExpectationsWithTimeout(3, handler: nil)
76
}
77
+
78
+ func testEngineDecodesUTF8Properly() {
79
+ let expectation = expectationWithDescription("Engine Decodes utf8")
80
81
+ client.on("stringTest") {data, ack in
82
+ if let str = data[0] as? String {
83
+ assert(str == "lïne one\nlīne \rtwo", "Failed string test")
84
+ expectation.fulfill()
85
+ }
86
87
88
+ engine.parsePollingMessage("41:42[\"stringTest\",\"lïne one\\nlīne \\rtwo\"]")
89
+ waitForExpectationsWithTimeout(3, handler: nil)
90
91
0 commit comments