Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
71152562
...
711525622db0ea02a0702855c00dddc1968f4d13
authored
2002-08-25 12:52:12 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Updated
1 parent
fbe632e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
117 additions
and
0 deletions
ChangeLog
imap4d/testsuite/imap4d/search.exp
ChangeLog
View file @
7115256
2002
-
08
-
23
Sergey
Poznyakoff
*
configure
.
ac
:
Added
check
for
socklen_t
.
*
imap4d
/
commands
.
c
:
Fixed
allowed
states
for
X
-
VERSION
command
.
*
imap4d
/
fetch
.
c
(
fetch_operation
)
Fix
section
specification
output
.
*
mail
/
testsuite
/
mail
/
folder
.
exp
:
Enabled
"folders"
test
.
*
imap4d
/
testsuite
/
imap4d
/
examine
.
exp
:
Moved
get_uidvalidity
to
imap4d
.
exp
and
renamed
it
to
imap4d_uidvalidity
.
*
imap4d
/
testsuite
/
lib
/
imap4d
.
exp
:
Likewise
(
imap4d_test
)
:
Added
new
switches
:
-
literal
and
-
noliteral
*
imap4d
/
testsuite
/
imap4d
/
fetch
.
exp
:
New
file
*
imap4d
/
testsuite
/
imap4d
/
x
.
exp
:
New
file
*
imap4d
/
testsuite
/
imap4d
/
DISTFILES
:
Added
fetch
.
exp
,
x
.
exp
*
imap4d
/
testsuite
/
imap4d
/
search
.
exp
:
Added
comments
*
testsuite
/
spool
/
mbox
:
Changed
`
organisation
'
header
*
testsuite
/
spool
/
mbox1
:
Likewise
.
*
mail
/
testsuite
/
mail
/
write
.
exp
:
Adjusted
tests
to
the
changes
in
mbox
and
mbox1
.
*
libmu_scm
/
mu_address
.
c
(
mu_address_get_count
)
:
Fixed
type
of
`
count
'
variable
*
mailbox
/
list
.
c
(
list_remove
)
:
Removed
cast
from
void
*
to
int
,
it
does
not
work
on
64
-
bit
machines
.
Besides
,
pointer
comparison
is
strictly
defined
by
C
.
*
mailbox
/
observer
.
c
(
observable_detach
)
:
Likewise
.
*
mailbox
/
tcp
.
c
(
_tcp_open
)
:
Changed
type
of
`
namelen
'
to
socklen_t
.
*
mh
/
mh_format
.
c
:
Changed
type
of
`
len
'
to
size_t
.
*
mail
/
folders
.
c
(
mail_folders
)
:
Protect
directory
name
with
quotes
.
2002
-
08
-
23
Sergey
Poznyakoff
*
testsuite
/
lib
/
mailutils
.
exp
:
Introduced
-
re
flag
...
...
imap4d/testsuite/imap4d/search.exp
View file @
7115256
...
...
@@ -16,6 +16,21 @@
# along with this program
;
if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 6.4.4. SEARCH Command
# Arguments: OPTIONAL [CHARSET
]
specification
# searching criteria (one or more
)
# Responses: REQUIRED untagged response: SEARCH
# Result: OK - search completed
# NO - search error: can't search that [CHARSET
]
or
# criteria
# BAD - command unknown or arguments invalid
#
# The SEARCH command searches the mailbox for messages that match
# the given searching criteria. Searching criteria consist of one
# or more search keys. The untagged SEARCH response from the server
# contains a listing of message sequence numbers corresponding to
# those messages that match the searching criteria.
imap4d_start
imap4d_auth
"user!passwd"
"guessme"
...
...
@@ -31,19 +46,33 @@ imap4d_test "SELECT INBOX"\
"OK
\[
PERMANENTFLAGS (
\\
Answered
\\
Deleted
\\
Seen)
\]
Permanent flags"
\
"OK
\[
READ-WRITE
\]
SELECT Completed"
# <message set> Messages with message sequence numbers
# corresponding to the specified message sequence
# number set
imap4d_test
"SEARCH 1:*"
\
"SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95"
\
"OK"
# ALL All messages in the mailbox
;
the default initial
# key for ANDing.
imap4d_test
"SEARCH ALL"
\
"SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95"
\
"OK"
# NEW Messages that have the \Recent flag set but not the
# \Seen flag. This is functionally equivalent to
# "(RECENT UNSEEN
)
".
# All messages are still new
imap4d_test "
SEARCH NEW
"
\
"
SEARCH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
"
\
"
OK
"
# FROM <string> Messages that contain the specified string in the
# envelope structure's FROM field.
imap4d_test "
SEARCH FROM alice
"
\
"
SEARCH 2 4 6 8 10 12 14 20 25 27 29 33 36 38 40 43 45 47 51 53 55 57 59 63 66 68 70 72 74 76 78 80 82 85 87 90 93 95
"
\
"
OK
"
...
...
@@ -52,34 +81,63 @@ imap4d_test "SEARCH FROM hare" \
"
SEARCH 1 3 5 7 9 11 13 16 22 24 35 42 58 62 71
"
\
"
OK
"
# LARGER <n> Messages with an
[
RFC-822
]
size larger than the
# specified number of octets.
imap4d_test "
SEARCH LARGER 512
"
\
"
SEARCH 41 46
"
\
"
OK
"
# SMALLER <n> Messages with an
[
RFC-822
]
size smaller than the
# specified number of octets.
imap4d_test "
SEARCH SMALLER 300
"
\
"
SEARCH 12 20 35
"
\
"
OK
"
# SUBJECT <string> Messages that contain the specified string in the
# envelope structure's SUBJECT field.
imap4d_test "
SEARCH SUBJECT
\"
watch
\"
"
\
"
SEARCH 19 20 21 22 23 24 25 26 27 28 29
"
\
"
OK
"
# HEADER <field-name> <string>
# Messages that have a header with the specified
# field-name (as defined in
[
RFC-822
]
) and that
# contains the specified string in the
[
RFC-822
]
# field-body.
imap4d_test "
SEARCH HEADER Message-Id
\"
<200207292200.3303@wonder.land>
\"
"
\
"
SEARCH 3
"
\
"
OK
"
# CC <string> Messages that contain the specified string in the
# envelope structure's CC field.
imap4d_test "
SEARCH CC dormouse
"
\
"
SEARCH 60
"
\
"
OK
"
# TO <string> Messages that contain the specified string in the
# envelope structure's TO field.
imap4d_test "
SEARCH TO hare
"
\
"
SEARCH 2 4 6 8 10 12 14 21 23 42 59 72
"
\
"
OK
"
# SENTBEFORE <date>
# Messages whose
[
RFC-822
]
Date: header is earlier
# than the specified date.
imap4d_test "
SEARCH SENTBEFORE
\"
29-Jul-2002 22:00:02 +0100
\"
"
\
"
SEARCH 1
"
\
"
OK
"
# SENTSINCE <date>
# Messages whose
[
RFC-822
]
Date: header is within or
# later than the specified date.
imap4d_test "
SEARCH SENTSINCE
\"
29-Jul-2002 22:01:32 +0100
\"
"
\
"
SEARCH 92 93 94 95
"
\
"
OK
"
...
...
@@ -88,10 +146,16 @@ imap4d_test "SEARCH SENTSINCE \"29-Jul-2002 23:01:32 +0200\""\
"
SEARCH 92 93 94 95
"
\
"
OK
"
# BEFORE <date> Messages whose internal date is earlier than the
# specified date.
imap4d_test "
SEARCH BEFORE
\"
29-Jul-2002 22:00:09 +0000
\"
"
\
"
SEARCH 1
"
\
"
OK
"
# SINCE <date> Messages whose internal date is within or later
# than the specified date.
imap4d_test "
SEARCH SINCE
\"
29-Jul-2002 22:01:36 +0000
\"
"
\
"
SEARCH 89 90 91 92 93 94 95
"
\
"
OK
"
...
...
@@ -102,22 +166,37 @@ imap4d_test "STORE 3,5,89 +FLAGS (\\Answered)"\
"
89 FETCH FLAGS
(
\\
Answered
\\
Recent
)
"
\
"
OK
"
# ANSWERED Messages with the
\A
nswered flag set.
imap4d_test "
SEARCH ANSWERED
"
\
"
SEARCH 3 5 89
"
\
"
OK
"
# TEXT <string> Messages that contain the specified string in the
# header or body of the message.
imap4d_test "
SEARCH TEXT wine
"
\
"
SEARCH 1 2 3
"
\
"
OK
"
## Boolean operations
# When multiple keys are specified, the result is the intersection
# (AND function) of all the messages that match those keys.
imap4d_test "
SEARCH TEXT wine FROM alice
"
\
"
SEARCH 2
"
\
"
OK
"
# OR <search-key1> <search-key2>
# Messages that match either search key.
imap4d_test "
SEARCH OR FROM alice ANSWERED
"
\
"
SEARCH 2 3 4 5 6 8 10 12 14 20 25 27 29 33 36 38 40 43 45 47 51 53 55 57 59 63 66 68 70 72 74 76 78 80 82 85 87 89 90 93 95
"
\
"
OK
"
## Check precedence
imap4d_test "
SEARCH
(
OR FROM alice ANSWERED
)
SENTSINCE
\"
29-Jul-2002 22:00:33 +0100
\"
"
\
"
SEARCH 33 36 38 40 43 45 47 51 53 55 57 59 63 66 68 70 72 74 76 78 80 82 85 87 89 90 93 95
"
\
"
OK
"
...
...
@@ -133,3 +212,5 @@ imap4d_test "SEARCH OR FROM alice ANSWERED SENTSINCE \"29-Jul-2002 22:00:33 +010
imap4d_test "
SEARCH OR FROM alice
(
ANSWERED SENTSINCE
\"
29-Jul-2002 22:00:33 +0100
\"
SENTBEFORE
\"
29-Jul-2002 22:00:56 +0100
\"
)
"
\
"
SEARCH 2 4 6 8 10 12 14 20 25 27 29 33 36 38 40 43 45 47 51 53 55 57 59 63 66 68 70 72 74 76 78 80 82 85 87 90 93 95
"
\
"
OK
"
#end of search.exp
...
...
Please
register
or
sign in
to post a comment