mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:53:33 +03:00
Added support for LISTing a single POP3 message
Added tests for a number of POP3 LIST operations, including one that shows a curl problem when listing no messages, so is disabled.
This commit is contained in:
parent
409867e62b
commit
ef1c18b952
9 changed files with 229 additions and 3 deletions
|
|
@ -3,3 +3,4 @@
|
|||
# per line.
|
||||
# Lines starting with '#' letters are treated as comments.
|
||||
564
|
||||
811
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
|
|||
test313 test1115 test578 test579 test1116 test1200 test1201 test1202 \
|
||||
test1203 test1117 test1118 test1119 test1120 test1300 test1301 test1302 \
|
||||
test1303 test320 test321 test322 test323 test324 test1121 test581 test580 \
|
||||
test1304 test1305 test1306 test1307 test582 test583
|
||||
test1304 test1305 test1306 test1307 test582 test583 test808 test809 \
|
||||
test810 test811
|
||||
|
||||
filecheck:
|
||||
@mkdir test-place; \
|
||||
|
|
|
|||
41
tests/data/test808
Normal file
41
tests/data/test808
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
POP3
|
||||
LIST
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<servercmd>
|
||||
REPLY LIST +OK 808 100
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
pop3
|
||||
</server>
|
||||
<name>
|
||||
POP3 LIST one message
|
||||
</name>
|
||||
<command>
|
||||
pop3://%HOSTIP:%POP3PORT/808 -l -u user:secret
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
USER user
|
||||
PASS secret
|
||||
LIST 808
|
||||
QUIT
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
45
tests/data/test809
Normal file
45
tests/data/test809
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
POP3
|
||||
LIST
|
||||
FAILURE
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<servercmd>
|
||||
REPLY LIST -ERR no such message
|
||||
</servercmd>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
pop3
|
||||
</server>
|
||||
<name>
|
||||
POP3 LIST invalid message
|
||||
</name>
|
||||
<command>
|
||||
pop3://%HOSTIP:%POP3PORT/809 -l -u user:secret
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
78
|
||||
</errorcode>
|
||||
<protocol>
|
||||
USER user
|
||||
PASS secret
|
||||
LIST 809
|
||||
QUIT
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
45
tests/data/test810
Normal file
45
tests/data/test810
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
POP3
|
||||
LIST
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
# When doing LIST, we get the default list output hard-coded in the test
|
||||
# POP3 server
|
||||
<datacheck>
|
||||
1 100
|
||||
2 4294967400
|
||||
4 200
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
pop3
|
||||
</server>
|
||||
<name>
|
||||
POP3 LIST messages
|
||||
</name>
|
||||
<command>
|
||||
pop3://%HOSTIP:%POP3PORT/ -u user:secret
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
USER user
|
||||
PASS secret
|
||||
LIST
|
||||
QUIT
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
43
tests/data/test811
Normal file
43
tests/data/test811
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
POP3
|
||||
LIST
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
<servercmd>
|
||||
REPLY LIST +OK but no messages\r\n.
|
||||
</servercmd>
|
||||
<datacheck>
|
||||
</datacheck>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
pop3
|
||||
</server>
|
||||
<name>
|
||||
POP3 LIST no messages available
|
||||
</name>
|
||||
<command>
|
||||
pop3://%HOSTIP:%POP3PORT/ -u user:secret
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<protocol>
|
||||
USER user
|
||||
PASS secret
|
||||
LIST
|
||||
QUIT
|
||||
</protocol>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue