diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /pigeonhole/tests/failures | |
parent | Initial commit. (diff) | |
download | dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pigeonhole/tests/failures')
-rw-r--r-- | pigeonhole/tests/failures/fuzz1.svtest | 33 | ||||
-rw-r--r-- | pigeonhole/tests/failures/fuzz2.svtest | 37 | ||||
-rw-r--r-- | pigeonhole/tests/failures/fuzz3.svtest | 12 | ||||
-rw-r--r-- | pigeonhole/tests/failures/mailbox-bad-utf8.svtest | 6 |
4 files changed, 88 insertions, 0 deletions
diff --git a/pigeonhole/tests/failures/fuzz1.svtest b/pigeonhole/tests/failures/fuzz1.svtest new file mode 100644 index 0000000..a6fe086 --- /dev/null +++ b/pigeonhole/tests/failures/fuzz1.svtest @@ -0,0 +1,33 @@ +# Used to cause the test suite to segfault + +require "vnd.dovecot.testsuite"; +require "fileinto"; +require "imap4flags"; +require "mailbox"; + + +test_set "message" text: +Subject: Test message. + +Test message. +. +; + +test "Flag changes between stores" { + fileinto :create "FolderA"; + + if not test_result_execute { + test_fail "failed to execute first result"; + } + + test_message :folder "FolderA" 0; + + test_result_reset; + + test_message :folder "Uninteiesting" 0; + + if not hasflag "$label1" { + test_fail "flags not stored for fired for third message"; + } + +} diff --git a/pigeonhole/tests/failures/fuzz2.svtest b/pigeonhole/tests/failures/fuzz2.svtest new file mode 100644 index 0000000..9fa63ea --- /dev/null +++ b/pigeonhole/tests/failures/fuzz2.svtest @@ -0,0 +1,37 @@ +require "vnd.dovecot.testsuite"; +require "fileinto"; +require "variables"; +require "mailbox"; + +set "message" text: +From:.org +To:rg +Subject: First message + +Frop +. +; + + +test "sometest" { + test_set "message" "${message}"; + + fileinto :create "Folder"; + + if not test_result_execute { + test_fail ""; + } + + test_message :folder "Folder" 0; + + if not header "subject" "First message" { + test_fail ""; + } + + test_message :folder " .Folder" 1; + + if not header "subject" "Second message" { + test_fail ""; + } + +} diff --git a/pigeonhole/tests/failures/fuzz3.svtest b/pigeonhole/tests/failures/fuzz3.svtest new file mode 100644 index 0000000..c1c22dc --- /dev/null +++ b/pigeonhole/tests/failures/fuzz3.svtest @@ -0,0 +1,12 @@ +require "vnd.dovecot.testsuite"; +require "fileinto"; +require "mailbox"; + +test"" { + fileinto :create "Folder"; + + if test_result_execute { + } + + test_message :folder "Folder" 2; +} diff --git a/pigeonhole/tests/failures/mailbox-bad-utf8.svtest b/pigeonhole/tests/failures/mailbox-bad-utf8.svtest new file mode 100644 index 0000000..ad104e5 --- /dev/null +++ b/pigeonhole/tests/failures/mailbox-bad-utf8.svtest @@ -0,0 +1,6 @@ +require "vnd.dovecot.testsuite"; +require "encoded-character"; + +test "Mailbox parameter with bad UTF-8" { + test_message :folder "I${hex:9b}BOX" 0; +} |