Commit 6259bcd5 authored by Yang Tse's avatar Yang Tse
Browse files

Chris Conroy provided first RTSP tests
parent a4031dbd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -64,7 +64,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
 test1097 test560 test561 test1098 test1099 test562 test563 test1100       \
 test564 test1101 test1102 test1103 test1104 test299 test310 test311       \
 test312 test1105 test565 test800 test1106 test801 test566 test802 test803 \
 test1107 test1108 test1109 test1110 test1111 test1112 test129
 test1107 test1108 test1109 test1110 test1111 test1112 test129 test567     \
 test568 test569 test570 test571

filecheck:
	@mkdir test-place; \

tests/data/test567

0 → 100644
+50 −0
Original line number Diff line number Diff line
<testcase>

#Informational
<info>
<keywords>
RTSP
OPTIONS
</keywords>
</info>

# Server-side
<reply>
<data>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
CSeq: 1
Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY, PAUSE
Curl-Private: swsclose
</data>
</reply>

# Client-Side
<client>
<server>
rtsp
</server>
<tool>
lib567
</tool>

<name>
simple RTSP OPTIONS command
</name>
<command>
rtsp://%HOSTIP:%RTSPPORT/567
</command>
</client>

<verify>
<protocol>
OPTIONS rtsp://%HOSTIP:%RTSPPORT/567 RTSP/1.0
CSeq: 1
User-Agent: test567
Test-Number: 567

</protocol>
</verify>

</testcase>

tests/data/test568

0 → 100644
+117 −0
Original line number Diff line number Diff line
<testcase>

#Informational
<info>
<keywords>
RTSP
ANNOUNCE
</keywords>
</info>

# Server-side
<reply>
<data1>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
Cseq: 1

</data1>

<data2>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
Cseq: 2
Content-Length: 70
Content-Type: application/sdp

v=0
s=sws SDP
i=A fake SDP reply
u=http://www.curl.haxx.se/fakesdp.ps
</data2>
<data3>
RTSP/1.0 200 Okie Dokie
Server: SWS/libcurl-test
Cseq: 3

</data3>
<data4>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
CSeq: 4
Curl-private: swsclose
Informational: Empty Options Response

</data4>
</reply>

# Client-Side
<client>
<server>
rtsp
</server>
<tool>
lib568
</tool>

<name>
RTSP Announce (PUT and POST style) test
</name>
<command>
rtsp://%HOSTIP:%RTSPPORT/568
</command>
# file written before test command runs
<file name="log/file568.txt">
v=0
o=mhandley 2890844526 2890845468 IN IP4 126.16.64.4
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
e=mjh@isi.edu (Mark Handley)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
a=recvonly
m=audio 3456 RTP/AVP 0
m=video 2232 RTP/AVP 31
</file>
</client>

<verify>
<strip>
^If-Modified-Since:.*
</strip>
<protocol>
ANNOUNCE rtsp://%HOSTIP:%RTSPPORT/5680001 RTSP/1.0
CSeq: 1
Content-Length: 317
Content-Type: application/sdp

v=0
o=mhandley 2890844526 2890845468 IN IP4 126.16.64.4
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
e=mjh@isi.edu (Mark Handley)
c=IN IP4 224.2.17.12/127
t=2873397496 2873404696
a=recvonly
m=audio 3456 RTP/AVP 0
m=video 2232 RTP/AVP 31
DESCRIBE rtsp://%HOSTIP:%RTSPPORT/5680002 RTSP/1.0
CSeq: 2
Accept: application/sdp

ANNOUNCE rtsp://%HOSTIP:%RTSPPORT/5680003 RTSP/1.0
CSeq: 3
Content-Type: posty goodness
Content-Length: 35

postyfield=postystuff&project=curl
OPTIONS rtsp://%HOSTIP:%RTSPPORT/5680004 RTSP/1.0
CSeq: 4

</protocol>
</verify>

</testcase>

tests/data/test569

0 → 100644
+110 −0
Original line number Diff line number Diff line
<testcase>

#Informational
<info>
<keywords>
RTSP
SESSION_ID
</keywords>
</info>

# Server-side
<reply>
<data1>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
CSeq: 1
Session: 00.+1-am-aSe55ion_id\$yes-i-am\$;timeout=60

</data1>
<data2>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
CSeq: 2

</data2>
<data3>
RTSP/1.0 200 OK
Session:        \$extraspaces ignore-this-part-------;foo=bar
CSeq: 3
Server: SWS/libcurl-test

</data3>
<data4>
RTSP/1.0 200 OK
CSeq: 4
Server: SWS/libcurl-test

</data4>
<data5>
RTSP/1.0 200 OK
Session: A
Server: SWS/libcurl-test
CSeq: 5
Informational: Single Character

</data5>
<data6>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
Curl-Private: swsclose
CSeq: 6

</data6>

# Client-Side
<client>
<server>
rtsp
</server>
<tool>
lib569
</tool>

<name>
RTSP Session ID parsing
</name>
<command>
rtsp://%HOSTIP:%RTSPPORT/569 log/idfile.txt
</command>
</client>

<verify>
<strip>
^If-Modified-Since:.*
</strip>
<protocol>
SETUP rtsp://%HOSTIP:%RTSPPORT/5690001 RTSP/1.0
CSeq: 1
Transport: Fake/NotReal/JustATest;foo=baz

TEARDOWN rtsp://%HOSTIP:%RTSPPORT/5690002 RTSP/1.0
CSeq: 2
Session: 00.+1-am-aSe55ion_id\$yes-i-am\$

SETUP rtsp://%HOSTIP:%RTSPPORT/5690003 RTSP/1.0
CSeq: 3
Transport: Fake/NotReal/JustATest;foo=baz

TEARDOWN rtsp://%HOSTIP:%RTSPPORT/5690004 RTSP/1.0
CSeq: 4
Session: \$extraspaces

SETUP rtsp://%HOSTIP:%RTSPPORT/5690005 RTSP/1.0
CSeq: 5
Transport: Fake/NotReal/JustATest;foo=baz

TEARDOWN rtsp://%HOSTIP:%RTSPPORT/5690006 RTSP/1.0
CSeq: 6
Session: A

</protocol>
<file name="log/idfile.txt">
Got Session ID: [00.+1-am-aSe55ion_id\$yes-i-am\$]
Got Session ID: [\$extraspaces]
Got Session ID: [A]
</file>
</verify>

</testcase>

tests/data/test570

0 → 100644
+77 −0
Original line number Diff line number Diff line
<testcase>

#Informational
<info>
<keywords>
RTSP
Mismatch checking
</keywords>
</info>

# Server-side
<reply>
<data1>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
CSeq: 2
Public: DESCRIBE, OPTIONS, SETUP, TEARDOWN, PLAY, PAUSE
Informational: CSeq Mismatch

</data1>
<data2>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
Session: asdf
CSeq: 999

</data2>
<data3>
RTSP/1.0 200 OK
Server: SWS/libcurl-test
Session: asdfWRONG
Informational: Session ID mismatch
Curl-Private: swsclose
CSeq: 1000

</data3>

</reply>

# Client-Side
<client>
<server>
rtsp
</server>
<tool>
lib570
</tool>

<name>
RTSP CSeq and Session Mismatch checks
</name>
<command>
rtsp://%HOSTIP:%RTSPPORT/570
</command>
</client>

<verify>
<strip>
^If-Modified-Since:.*
</strip>
<protocol>
OPTIONS rtsp://%HOSTIP:%RTSPPORT/5700001 RTSP/1.0
CSeq: 1

SETUP rtsp://%HOSTIP:%RTSPPORT/5700002 RTSP/1.0
CSeq: 999
Transport: RAW/RAW/UDP;unicast;client_port=3056-3057

PLAY rtsp://%HOSTIP:%RTSPPORT/5700003 RTSP/1.0
CSeq: 1000
Session: asdf

</protocol>
</verify>

</testcase>
Loading