Commit 39aab335 39aab33579aef8a9460e1fda739b508feeaba2b1 by Sam Roberts

Exercise a little more of sieve.

1 parent a2a0c1ea
_*
INBOX
sv
*.sv
mbox.*
g
......
......@@ -2,11 +2,15 @@
default: test-complex
HOME :=$(shell pwd)
export HOME
.PHONY: test-complex
test-complex:
rm -f mbox.complex.*
grep -v X-UID < mbox.complex > mbox.complex.in
../sieve -k -f mbox.complex.in t-complex.sv
HOME=`pwd` ../sieve -k -f mbox.complex.in t-complex.sv
test: INBOX
./Test 2>&1 | tee test.out
......
......@@ -23,6 +23,6 @@
cp INBOX.orig INBOX
echo
echo Test: $t
../sieve -v -f ./INBOX $t
../sieve -f ./INBOX $t
done
......
This diff could not be displayed because it is too large.
require "fileinto";
if exists "subject"
if exists "X"
{
fileinto "subject";
keep;
}
......
......@@ -6,7 +6,9 @@ Test: ex-2.7.3.sv
Test: ex-3.1a.sv
Test: ex-3.1b.sv
Test: ex-3.2.sv
ex-3.2.sv:1: unsupported feature
Test: ex-4.1.sv
ex-4.1.sv:1: unsupported feature
Test: ex-4.2.sv
Test: ex-4.4a.sv
Test: ex-4.4b.sv
......@@ -14,312 +16,89 @@ Test: ex-4.5.sv
Test: ex-5.1.sv
Test: ex-5.7.sv
Test: ex-9.sv
ex-9.sv:5: unsupported feature
Test: ex-null.sv
Test: ex-save-all.sv
Test: ex-stop.sv
Test: exn-2.3b.sv might fail
Test: exn-5.4.sv might fail
== Action testing
Test: ex-1.10.2.sv
mbox had 2 messages...
getsize -> 587
action => DISCARD
action => KEEP
Action(s) taken:
Discarded
Kept
getsize -> 539
action => DISCARD
action => KEEP
Action(s) taken:
Discarded
Kept
discard - deleting failed: [0] Success
discard - deleting failed: [0] Success
DISCARD on msg uid 1: marking as deleted
KEEP on msg uid 1
DISCARD on msg uid 2: marking as deleted
KEEP on msg uid 2
Test: ex-2.3a.sv
mbox had 2 messages...
getsize -> 587
action => DISCARD
Action(s) taken:
Discarded
getsize -> 539
action => KEEP
Action(s) taken:
Kept
discard - deleting failed: [0] Success
DISCARD on msg uid 1: marking as deleted
KEEP on msg uid 2
Test: ex-2.5.1.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, From=coyote@desert.example.org
getheader Date, failed No such file or directory
getheader, from=coyote@desert.example.org
action => DISCARD
action => FILEINTO
into <popbox>
fail with [2] no handler for this type of mailbox
runtime error: Fileinto: no handler for this type of mailbox
Action(s) taken:
Discarded
Fileinto action failed: no handler for this type of mailbox
sieve_execute_script(1): sieve -1237848064 rc No error
discard - deleting failed: [0] Success
DISCARD on msg uid 1: marking as deleted
FILEINTO on msg uid 1: delivering into popbox
KEEP on msg uid 2
Test: ex-2.7.3.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, Subject=I have a present for you
action => KEEP
Action(s) taken:
Kept
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader, Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
action => KEEP
Action(s) taken:
Kept
KEEP on msg uid 1
KEEP on msg uid 2
Test: ex-3.1a.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, from=coyote@desert.example.org
action => DISCARD
Action(s) taken:
Discarded
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader, from=youcouldberich!@reply-by-postal-mail.invalid
getheader, subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
action => DISCARD
Action(s) taken:
Discarded
discard - deleting failed: [0] Success
discard - deleting failed: [0] Success
DISCARD on msg uid 1: marking as deleted
DISCARD on msg uid 2: marking as deleted
Test: ex-3.1b.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, From=coyote@desert.example.org
action => REDIRECT
Action(s) taken:
Redirected to acm@example.edu
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader, From=youcouldberich!@reply-by-postal-mail.invalid
getheader, Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
action => REDIRECT
Action(s) taken:
Redirected to postmaster@example.edu
REDIRECT on msg uid 1: to acm@example.edu
REDIRECT on msg uid 2: to postmaster@example.edu
Test: ex-3.2.sv
mbox had 2 messages...
action => KEEP
Action(s) taken:
Kept
action => KEEP
Action(s) taken:
Kept
ex-3.2.sv:1: unsupported feature
Test: ex-4.1.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, from=coyote@desert.example.org
action => REJECT
Action(s) taken:
Rejected with: I am not taking mail from you, and I don't want
your birdseed, either!
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader, from=youcouldberich!@reply-by-postal-mail.invalid
action => KEEP
Action(s) taken:
Kept
ex-4.1.sv:1: unsupported feature
Test: ex-4.2.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, from=coyote@desert.example.org
action => FILEINTO
into <INBOX.harassment>
fail with [2] no handler for this type of mailbox
runtime error: Fileinto: no handler for this type of mailbox
Action(s) taken:
Fileinto action failed: no handler for this type of mailbox
sieve_execute_script(1): sieve -1237848064 rc No error
FILEINTO on msg uid 1: delivering into INBOX.harassment
KEEP on msg uid 2
Test: ex-4.4a.sv
mbox had 2 messages...
getsize -> 587
action => KEEP
Action(s) taken:
Kept
getsize -> 539
action => KEEP
Action(s) taken:
Kept
KEEP on msg uid 1
KEEP on msg uid 2
Test: ex-4.4b.sv
mbox had 2 messages...
getsize -> 587
action => KEEP
Action(s) taken:
Kept
getsize -> 539
action => KEEP
Action(s) taken:
Kept
KEEP on msg uid 1
KEEP on msg uid 2
Test: ex-4.5.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, from=coyote@desert.example.org
action => KEEP
Action(s) taken:
Kept
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader, from=youcouldberich!@reply-by-postal-mail.invalid
action => KEEP
Action(s) taken:
Kept
KEEP on msg uid 1
KEEP on msg uid 2
Test: ex-5.1.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, from=coyote@desert.example.org
action => KEEP
Action(s) taken:
Kept
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader, from=youcouldberich!@reply-by-postal-mail.invalid
action => KEEP
Action(s) taken:
Kept
KEEP on msg uid 1
KEEP on msg uid 2
Test: ex-5.7.sv
mbox had 2 messages...
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader, X-Caffeine=C8H10N4O2
getheader, X-Caffeine=C8H10N4O2
action => KEEP
Action(s) taken:
Kept
getheader, filling cache with 4 fields
getheader, cacheing Date=TBD
getheader, cacheing Subject=$$$ YOU, TOO, CAN BE A MILLIONAIRE! $$$
getheader, cacheing To=rube@landru.example.edu
getheader, cacheing From=youcouldberich!@reply-by-postal-mail.invalid
getheader X-Caffeine, failed No such file or directory
getheader X-Caffeine, failed No such file or directory
action => DISCARD
Action(s) taken:
Discarded
discard - deleting failed: [0] Success
KEEP on msg uid 1
DISCARD on msg uid 2: marking as deleted
Test: ex-9.sv
mbox had 2 messages...
getsize -> 587
getheader, filling cache with 4 fields
getheader, cacheing X-Caffeine=C8H10N4O2
getheader, cacheing Subject=I have a present for you
getheader, cacheing To=roadrunner@acme.example.com
getheader, cacheing From=coyote@desert.example.org
getheader Sender, failed No such file or directory
getheader, From=coyote@desert.example.org
getheader, To=roadrunner@acme.example.com
getheader, To=roadrunner@acme.example.com
getheader Cc, failed No such file or directory
getheader Bcc, failed No such file or directory
action => FILEINTO
into <spam>
fail with [2] no handler for this type of mailbox
runtime error: Fileinto: no handler for this type of mailbox
Action(s) taken:
Fileinto action failed: no handler for this type of mailbox
sieve_execute_script(1): sieve -1237848064 rc No such file or directory
ex-9.sv:5: unsupported feature
Test: ex-null.sv
mbox had 2 messages...
action => KEEP
Action(s) taken:
Kept
KEEP on msg uid 1
KEEP on msg uid 2
action => KEEP
Action(s) taken:
Kept
Test: ex-save-all.sv
FILEINTO on msg uid 1: delivering into ./_save-all.mbox
FILEINTO on msg uid 2: delivering into ./_save-all.mbox
Test: ex-stop.sv
KEEP on msg uid 1
KEEP on msg uid 2
......