Fix test formatting
authorRichard Whitehouse <github@richardwhiuk.com>
Sun, 21 Oct 2018 22:31:06 +0000 (18:31 -0400)
committerRichard Whitehouse <github@richardwhiuk.com>
Sun, 21 Oct 2018 22:31:06 +0000 (18:31 -0400)
src/codec.rs

index 10360a5774fd14ba00d3183b5cb4e6ac6d9f8029..abfc36a29a430187f1093df5ca1c2afc796bdd37 100644 (file)
@@ -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: \
-                                <http://www.example.com/sounds/moo.wav>\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: \
-                                <http://wwww.example.com/alice/photo.jpg>;\
-                                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: \
-                                <sip:not-in-service-recording@atlanta.com>\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: \
-                                <sip:server10.biloxi.com;lr>\r\nReply-To: \
-                                <sip:bob@biloxi.com>\r\nRequire: \
-                                baz\r\nRetry-After:18000;duration=3600\r\nRoute: \
-                                <sip:bigbox3.site3.atlanta.com;lr>\r\nServer: rust-sip \
-                                tokio\r\nSubject: Foobaz\r\nSupported: rec\r\nTimestamp: 1 \
-                                2\r\nTo: <sip:operator@cs.columbia.edu>;\
-                                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: <http://www.example.com/sounds/moo.wav>\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: <http://wwww.example.com/alice/photo.jpg>; 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: <sip:not-in-service-recording@atlanta.com>\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: <sip:server10.biloxi.com;lr>\r\n\
+                                Reply-To: <sip:bob@biloxi.com>\r\n\
+                                Require: baz\r\n\
+                                Retry-After:18000;duration=3600\r\n\
+                                Route: <sip:bigbox3.site3.atlanta.com;lr>\r\n\
+                                Server: rust-sip tokio\r\n\
+                                Subject: Foobaz\r\n\
+                                Supported: rec\r\n\
+                                Timestamp: 1 2\r\n\
+                                To: <sip:operator@cs.columbia.edu>; 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);