From: Richard Whitehouse Date: Sun, 21 Oct 2018 22:31:06 +0000 (-0400) Subject: Fix test formatting X-Git-Url: https://git.richardwhiuk.com/?a=commitdiff_plain;h=738f354c706984d8ca88b6697f7f67c5f3d4cf51;p=rust-sip.git Fix test formatting --- diff --git a/src/codec.rs b/src/codec.rs index 10360a5..abfc36a 100644 --- a/src/codec.rs +++ b/src/codec.rs @@ -481,38 +481,52 @@ mod tests { env_logger::init().unwrap(); let message = - decode_sip_message("MESSAGE sip:test.com SIP/2.0\r\nAccept: \ - text/plain\r\nAccept-Encoding: *\r\nAccept-Language: \ - en-gb\r\nAlert-Info: \ - \r\nAllow: \ - MESSAGE\r\nAuthentication-Info: qop=auth\r\nAuthorization:Digest \ - username=\"Alice\"\r\nCall-ID: \ - f81d4fae-7dec-11d0-a765-00a0c91e6bf6@foo.bar.com\r\nCall-Info: \ - ;\ - purpose=icon\r\nContact: *\r\nContent-Disposition: \ - session\r\nContent-Encoding: gzip\r\nContent-Language: \ - en-gb\r\nContent-Length: 0\r\nContent-Type: text/plain\r\nCSeq: \ - 1 MESSAGE\r\nDate: Sat, 13 Nov 2010 23:29:00 GMT\r\nError-Info: \ - \r\nExpires: \ - 30\r\nFrom: sip:+12125551212@server.phone2net.com; \ - tag=887s\r\nIn-Reply-To: \ - 70710@saturn.bell-tel.com,17320@saturn.bell-tel.\ - com\r\nMax-Forwards: 32\r\nMIME-Version:2.0\r\nMin-Expires: \ - 30\r\nOrganization:Foobar\r\nPriority: \ - normal\r\nProxy-Authenticate: Digest \ - realm=\"atlanta.com\"\r\nProxy-Authorization: Digest \ - username=\"Bob\"\r\nProxy-Require: foo\r\nRecord-Route: \ - \r\nReply-To: \ - \r\nRequire: \ - baz\r\nRetry-After:18000;duration=3600\r\nRoute: \ - \r\nServer: rust-sip \ - tokio\r\nSubject: Foobaz\r\nSupported: rec\r\nTimestamp: 1 \ - 2\r\nTo: ;\ - tag=287447\r\nUnsupported: 100rel\r\nUser-Agent: \ - rust-sip\r\nVia: SIP/2.0/UDP \ - pc33.atlanta.com;branch=z9hG4bK776asdhds\r\nWarning: 370 devnull \ - \"Failure\"\r\nWWW-Authenticate: Digest \ - realm=\"biloxi.com\"\r\nX-Extension: test\r\n\r\n"); + decode_sip_message("MESSAGE sip:test.com SIP/2.0\r\n\ + Accept: text/plain\r\n\ + Accept-Encoding: *\r\n\ + Accept-Language: en-gb\r\n\ + Alert-Info: \r\n\ + Allow: MESSAGE\r\n\ + Authentication-Info: qop=auth\r\n\ + Authorization: Digest username=\"Alice\"\r\n\ + Call-ID: f81d4fae-7dec-11d0-a765-00a0c91e6bf6@foo.bar.com\r\n\ + Call-Info: ; purpose=icon\r\n\ + Contact: *\r\n\ + Content-Disposition: session\r\n\ + Content-Encoding: gzip\r\n\ + Content-Language: en-gb\r\n\ + Content-Length: 0\r\n\ + Content-Type: text/plain\r\n\ + CSeq: 1 MESSAGE\r\n\ + Date: Sat, 13 Nov 2010 23:29:00 GMT\r\n\ + Error-Info: \r\n\ + Expires: 30\r\n\ + From: sip:+12125551212@server.phone2net.com; tag=887s\r\n\ + In-Reply-To: 70710@saturn.bell-tel.com,17320@saturn.bell-tel. com\r\n\ + Max-Forwards: 32\r\n\ + MIME-Version:2.0\r\n\ + Min-Expires: 30\r\n\ + Organization: Foobar\r\n\ + Priority: normal\r\n\ + Proxy-Authenticate: Digest realm=\"atlanta.com\"\r\n\ + Proxy-Authorization: Digest username=\"Bob\"\r\n\ + Proxy-Require: foo\r\n\ + Record-Route: \r\n\ + Reply-To: \r\n\ + Require: baz\r\n\ + Retry-After:18000;duration=3600\r\n\ + Route: \r\n\ + Server: rust-sip tokio\r\n\ + Subject: Foobaz\r\n\ + Supported: rec\r\n\ + Timestamp: 1 2\r\n\ + To: ; tag=287447\r\n\ + Unsupported: 100rel\r\n\ + User-Agent: rust-sip\r\n\ + Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds\r\n\ + Warning: 370 devnull \"Failure\"\r\n\ + WWW-Authenticate: Digest realm=\"biloxi.com\"\r\n\ + X-Extension: test\r\n\r\n"); if let Message::Request(request) = message { assert_eq!(request.request_line.0.method, Method::MESSAGE);