Commit 36ac4e96 authored by urbant's avatar urbant
Browse files

header field added to the simple test case

parent a6d59eae
Loading
Loading
Loading
Loading
+54 −7
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ module Simple_Testcases
	const charstring c_CRLF := oct2char('0D'O) & oct2char('0A'O);

	template SipUrl m_simpleUrl (charstring user, charstring host, integer p) := {
		scheme :=	"sip:",
		scheme :=	"sip",
		userInfo := {
        	       userOrTelephoneSubscriber := user,
        	       password := omit
@@ -16,8 +16,8 @@ module Simple_Testcases
			host := host,
			portField := p 
		},
		urlParameters := omit,
		headers :=	omit
		urlParameters := *,
		headers :=	*
	}

	// testing SipUrl
@@ -27,10 +27,10 @@ module Simple_Testcases
		connect (self:testPort, self:testPort);

		// Test Body
		testPort.send ("sip:user@host:42");
		testPort.send ("sip:user;par=u%40example.net@host:42");
	
		alt {
			[] testPort.receive (m_simpleUrl ("user", "host", 42)) {
			[] testPort.receive (m_simpleUrl ("user;par=u%40example.net", "host", 42)) {
				setverdict (pass);
			}
			[] testPort.receive (SipUrl: ?) {
@@ -47,11 +47,58 @@ module Simple_Testcases
		connect (self:testPort, self:testPort);

		// Test Body
		testPort.send (	"From: sip:bl@blah.ah" & c_CRLF &
				"Via: SIP/2.0/UDP grabu.com" & c_CRLF &
		testPort.send (	"From: Caller <sip:caller@host:42>;tag=123" & c_CRLF &
				"Via: SIP/2.0/UDP grabu.com, SIP/2.0/UDP etsi.org" & c_CRLF &
				"Via: SIP/2.0/UDP pouic-pouic.com" & c_CRLF & 
				"Pouet: blah blah" & c_CRLF &
				"Via: SIP/2.0/UDP tutu.com" & c_CRLF &
				"Call-ID: a84b4c76e66710" & c_CRLF &
				"CSeq: 1 INVITE" & c_CRLF &
				"Content-Length: 0" & c_CRLF &
				"Content-Type: text/xml" & c_CRLF &				
				"To: User <sip:user@host:42>;test=5" & c_CRLF &
				"Contact: User <sip:user@etsi.org:42;test=5?par1=2&par2=30>, <http://www.etsi.org>, tel:5678" & c_CRLF &
				"Contact: User3 <sip:user3@etsi.org>" & c_CRLF &
				"Accept: text/*;abc=5;def , image/*" & c_CRLF &
				"Accept: audio/*;abc=5;def" & c_CRLF &
				"Accept-Language: en-us, en-uk, CZ;condition=2;template=abc" & c_CRLF &
				"Max-Forwards: 5" & c_CRLF &
				"Accept-Encoding: gzip;def=2  , *" & c_CRLF &
				"Alert-Info: <sip:etsi.org>, <tel:123456>" & c_CRLF &
				"Allow:    INVITE, ACK,   BYE , CANCEL" & c_CRLF &
				"Authentication-Info: qop = auth, cnonce=""abc"",nc=00000021" & c_CRLF &
				"Authorization: digest username = ""test"", cnonce=""abc"",nc=00000021" & c_CRLF &
				"Authorization: digest username = ""test2"", cnonce=""bcd"",nc=00000031" & c_CRLF &
				"Call-Info: <sip:etsi.org>;purpose = info, <tel:123456>" & c_CRLF &
				"Content-Disposition: session;param1=1; param2=""25&""" & c_CRLF &
				"Content-Encoding: gzip" & c_CRLF &
				"Content-Language: fr, en-us, en-uk" & c_CRLF &
				"Date : Sat, 13 Nov 2010 23:29:00 GMT"  & c_CRLF &
				"Error-Info: <sip:etsi.org>, <tel:123456>;par1=5" & c_CRLF &
				"Expires: 45" & c_CRLF &
				"In-Reply-To:  a84b4c76e66610, a84b4c76e66620, a84b4c76e66630" & c_CRLF &
				"MIME-Version: 5.25" & c_CRLF &
				"Min-Expires: 10" & c_CRLF &
				"Organization: ETSI Einstein Building" & c_CRLF &
				"Priority: normal" & c_CRLF &
				"Proxy-Authenticate: digest qop = auth, cnonce=""abc"",nc=00000021" & c_CRLF &
				"Proxy-Authorization: digest username = ""test"", cnonce=""abc"",nc=00000021" & c_CRLF &
				"Proxy-Require: abc, data" & c_CRLF &
				"Record-Route: <sip:etsi.org>, <tel:123456>" & c_CRLF &
				"Record-Route: <sip:elvior.ee>, <tel:99123456>" & c_CRLF &
				"Reply-To: User <sip:user@host:42>;test=5" & c_CRLF &
				"Retry-After: 5 (this is a comment)" & c_CRLF &
				"Require: good_feedback, warp_speed" & c_CRLF &
				"Require: something_else" & c_CRLF &
				"Route: <sip:etsi.org>, <tel:123456>" & c_CRLF &
				"Server: server1 server2 server4 server8" & c_CRLF &
				"Subject: some subject" & c_CRLF &
				"Supported: feature1, feature2, feature3" & c_CRLF &
				"Timestamp: 55.0" & c_CRLF &
				"UnSupported: fancy_feature1, fancy_feature2" & c_CRLF &
				"User-Agent: server3 server5" & c_CRLF &
				"Warning: 0001 etsi.org:42 ""This is an important warning""" & c_CRLF &
				"WWW-Authenticate: digest qop = auth, cnonce=""abc"",nc=00000021" & c_CRLF &
				"Pouet: blah blah again" & c_CRLF &
				" on multiple lines" & c_CRLF
				);