cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [bagder/curl] 1b4dc1: tests: Added test for IMAP SEARCH command

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 28 Aug 2013 10:07:06 +0200 (CEST)

On Tue, 27 Aug 2013, GitHub wrote:

> tests: Added test for IMAP SEARCH command

Thanks. It doesn't work though:

$ ./runtests.pl 810
********* System characteristics ********
* curl 7.33.0-DEV (x86_64-unknown-linux-gnu)
* libcurl/7.33.0-DEV OpenSSL/1.0.1e zlib/1.2.8 c-ares/1.10.1-DEV libidn/1.28
libssh2/1.4.4_DEV librtmp/2.3
* Features: AsynchDNS Debug TrackMemory GSS-Negotiate IDN IPv6 Largefile NTLM
NTLM_WB SSL libz TLS-SRP Metalink
* Host: storebror.haxx.se
* System: Linux storebror.haxx.se 3.10-1-amd64 #1 SMP Debian 3.10.3-1
(2013-07-27) x86_64 GNU/Linux
* Server SSL: ON libcurl SSL: ON
* debug build: ON track memory: ON
* valgrind: ON HTTP IPv6 ON
* FTP IPv6 ON Libtool lib: OFF
* Shared build: no
* SSL library: OpenSSL
* Ports:
* HTTP/8990 FTP/8992 FTP2/8995 RTSP/9007 FTPS/8993 HTTPS/8991
* TFTP/8997 HTTP-IPv6/8994 RTSP-IPv6/9008 FTP-IPv6/8996
* GOPHER/9009 GOPHER-IPv6/9009
* SSH/8999 SOCKS/9000 POP3/9001 IMAP/9003 SMTP/9005
* POP3-IPv6/9002 IMAP-IPv6/9004 SMTP-IPv6/9006
* HTTPTLS/9011 HTTPTLS-IPv6/9012
* HTTP-PIPE/9014
*****************************************
test 810...[IMAP SEARCH (CUSTOMREQUEST)]
Argument "" isn't numeric in numeric gt (>) at ./ftpserver.pl line 1043.

  810: data FAILED:
--- log/check-expected 2013-08-28 10:02:28.995853838 +0200
+++ log/check-generated 2013-08-28 10:02:28.995853838 +0200
@@ -1 +0,0 @@
-* SEARCH 1 123 456 810

  - abort tests
Killed
TESTDONE: 0 tests out of 1 reported OK: 0%
TESTFAIL: These test cases failed: 810
TESTDONE: 1 tests were considered during 3 seconds.

$ cat log/check-expected
* SEARCH 1 123 456 810
$ cat log/check-generated
$

It looks like the use of -X 'SEARCH NEW' is causing problems since the test
server will then try to get the test number off the string "NEW":

$ tail -50 log/imap_server.log
10:02:25.963442 IMAP server listens on port IPv4/9003
10:02:25.963531 logged pid 7007 in .imap_server.pid
10:02:25.963548 Awaiting input
10:02:26.947191 ====> Client connect
10:02:26.947299 > " _ _ ____ _ [CR][LF] ___| | | | _ \| |
[CR][LF] / __| | | | |_) | | [CR][LF] | (__| |_| | _ <| |___ [CR][LF]
\___|\___/|_| \_\_____|[CR][LF]* OK cURL IMAP server ready to serve[CR][LF]"
10:02:26.947754 < "A001 CAPABILITY"
10:02:26.947795 > "A001 BAD Command[CR][LF]"
10:02:26.948075 < "A002 LIST "verifiedserver" *"
10:02:26.948124 LIST_imap got "verifiedserver" *
10:02:26.948142 return proof we are we
10:02:26.948165 > "* LIST () "/" "WE ROOLZ: 7007"[CR][LF]"
10:02:26.948186 > "A002 OK LIST Completed[CR][LF]"
10:02:26.988496 < "A003 LOGOUT"
10:02:26.988532 > "* BYE cURL IMAP server signing off[CR][LF]"
10:02:26.988553 > "A003 OK LOGOUT completed[CR][LF]"
10:02:27.028389 MAIN sockfilt said DISC
10:02:27.028419 ====> Client disconnected
10:02:27.028462 Awaiting input
10:02:28.747766 ====> Client connect
10:02:28.747858 > " _ _ ____ _ [CR][LF] ___| | | | _ \| |
[CR][LF] / __| | | | |_) | | [CR][LF] | (__| |_| | _ <| |___ [CR][LF]
\___|\___/|_| \_\_____|[CR][LF]* OK cURL IMAP server ready to serve[CR][LF]"
10:02:28.783671 < "A001 CAPABILITY"
10:02:28.783703 > "A001 BAD Command[CR][LF]"
10:02:28.789691 < "A002 LOGIN user secret"
10:02:28.789721 > "A002 OK LOGIN completed[CR][LF]"
10:02:28.805389 < "A003 SELECT 810"
10:02:28.805414 SELECT_imap got test 810
10:02:28.805434 > "* 172 EXISTS[CR][LF]"
10:02:28.805451 > "* 1 RECENT[CR][LF]"
10:02:28.805467 > "* OK [UNSEEN 12] Message 12 is first unseen[CR][LF]"
10:02:28.805483 > "* OK [UIDVALIDITY 3857529045] UIDs valid[CR][LF]"
10:02:28.805500 > "* OK [UIDNEXT 4392] Predicted next UID[CR][LF]"
10:02:28.805515 > "* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)[CR][LF]"
10:02:28.805531 > "* OK [PERMANENTFLAGS (\Deleted \Seen \*)] Limited[CR][LF]"
10:02:28.805547 > "A003 OK [READ-WRITE] SELECT completed[CR][LF]"
10:02:28.850508 < "A004 SEARCH NEW"
10:02:28.850532 SEARCH_imap got test NEW
10:02:28.850593 > "A004 OK SEARCH completed[CR][LF]"
10:02:28.881160 < "A005 LOGOUT"
10:02:28.881190 > "* BYE cURL IMAP server signing off[CR][LF]"
10:02:28.881208 > "A005 OK LOGOUT completed[CR][LF]"
10:02:28.926678 MAIN sockfilt said DISC
10:02:28.926708 ====> Client disconnected
10:02:28.926744 Awaiting input

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-08-28