From 828d32beb8b1c9c62b98a0bd97ca0778bfcfd8a9 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 7 Sep 2018 15:13:58 +0200 Subject: [PATCH] Add unit test --- TunnelKitTests/PushTests.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TunnelKitTests/PushTests.swift b/TunnelKitTests/PushTests.swift index 5fdf864..650bd7d 100644 --- a/TunnelKitTests/PushTests.swift +++ b/TunnelKitTests/PushTests.swift @@ -92,6 +92,14 @@ class PushTests: XCTestCase { XCTAssertEqual(reply.dnsServers, ["2001:4860:4860::8888", "2001:4860:4860::8844"]) } + func testCompressionFraming() { + let msg = "PUSH_REPLY,dhcp-option DNS 8.8.8.8,dhcp-option DNS 4.4.4.4,comp-lzo no,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-CBC" + let reply = try! SessionProxy.PushReply(message: msg)! + reply.debug() + + XCTAssertEqual(reply.compressionFraming, .compLZO) + } + func testNCP() { let msg = "PUSH_REPLY,dhcp-option DNS 8.8.8.8,dhcp-option DNS 4.4.4.4,comp-lzo no,route 10.8.0.1,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-CBC" let reply = try! SessionProxy.PushReply(message: msg)!