summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-06-12 14:37:14 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-06-12 14:37:27 +0300
commit1f3e74f57c2d902ed5e070fc895513dc82f2ef05 (patch)
tree1b395856771a9f551ca017cbfb5e99d1762edf2f /testsuite
parent9b1f704b706d987f40ae4e6e375ed9e1aca56127 (diff)
downloadmailutils-1f3e74f57c2d902ed5e070fc895513dc82f2ef05.tar.gz
mailutils-1f3e74f57c2d902ed5e070fc895513dc82f2ef05.tar.bz2
libmu_scm: more tests
* testsuite/spool/mbox2: New file. Same messages as in mbox1, but with Mailutils auxiliary headers added. Ideally, libmailutils should not add any headers to the messages, unless explicitly requested to do so. Hopefully, I'll fix this in future. * testsuite/spool/DISTFILES: Add mbox2 and mime.msg * libmu_scm/tests/mailbox-append-message.at: New testcase. * libmu_scm/tests/mailbox-expunge.at: New testcase. * libmu_scm/tests/message-delete.at: New testcase. * libmu_scm/tests/message-get-flag.at: New testcase. * libmu_scm/mu_message.c (mu_scm_message_print): Display flags. * libmu_scm/tests/Makefile.am: Add new files. * libmu_scm/tests/mailbox-print.at: Remove the now superfluous quoting. * libmu_scm/tests/message-get-part.at: Likewise. * libmu_scm/tests/testsuite.at (MU_GUILE_CHECK): Quote the argument to AT_DATA Include new tests. Changes missing from the previous commit: * libmu_scm/mailutils/ancilla.scm * libmu_scm/mu_body.c * libmu_scm/mu_port.c
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/spool/DISTFILES2
-rw-r--r--testsuite/spool/mbox2231
2 files changed, 233 insertions, 0 deletions
diff --git a/testsuite/spool/DISTFILES b/testsuite/spool/DISTFILES
index 383ba028e..f036c77a7 100644
--- a/testsuite/spool/DISTFILES
+++ b/testsuite/spool/DISTFILES
@@ -1,6 +1,8 @@
bigto.mbox
mbox1
+mbox2
mbox
+mime.msg
msg.mbox
search.mbox
sieve.mbox
diff --git a/testsuite/spool/mbox2 b/testsuite/spool/mbox2
new file mode 100644
index 000000000..fc7f9420a
--- /dev/null
+++ b/testsuite/spool/mbox2
@@ -0,0 +1,231 @@
+From foobar@nonexistent.net Fri Dec 28 22:18:09 2001
+Received: (from foobar@nonexistent.net)
+ by nonexistent.net id fBSKI8N04906
+ for bar@dontmailme.org; Fri, 28 Dec 2001 22:18:08 +0200
+Date: Fri, 28 Dec 2001 22:18:08 +0200
+From: Foo Bar <foobar@nonexistent.net>
+Message-Id: <200112282018.fBSKI8N04906@nonexistent.net>
+To: Bar <bar@dontmailme.org>
+Subject: Jabberwocky
+X-IMAPbase: 1528796916 6
+Status:
+X-UID: 1
+
+`Twas brillig, and the slithy toves
+Did gyre and gimble in the wabe;
+All mimsy were the borogoves,
+And the mome raths outgrabe.
+
+`Beware the Jabberwock, my son!
+The jaws that bite, the claws that catch!
+Beware the Jujub bird, and shun
+The frumious Bandersnatch!'
+
+He took his vorpal sword in hand:
+Long time the manxome foe he sought --
+So rested he by the Tumtum gree,
+And stood awhile in thought.
+
+And as in uffish thought he stood,
+The Jabberwock, with eyes of flame,
+Came whiffling through the tulgey wook,
+And burbled as it came!
+
+One, two! One, two! And through and through
+The vorpal blade went snicker-snack!
+He left it dead, and with its head
+He went galumphing back.
+
+`And has thou slain the Jabberwock?
+Come to my arms, my beamish boy!
+O frabjous day! Calloh! Callay!
+He chortled in his joy.
+
+`Twas brillig, and the slithy toves
+Did gyre and gimble in the wabe;
+All mimsy were the borogoves,
+And the mome raths outgrabe.
+
+
+From bar@dontmailme.org Fri Dec 28 23:28:09 2001
+Received: (from bar@dontmailme.org)
+ by dontmailme.org id fERKR9N16790
+ for foobar@nonexistent.net; Fri, 28 Dec 2001 22:18:08 +0200
+Date: Fri, 28 Dec 2001 23:28:08 +0200
+From: Bar <bar@dontmailme.org>
+To: Foo Bar <foobar@nonexistent.net>
+Message-Id: <200112232808.fERKR9N16790@dontmailme.org>
+Subject: Re: Jabberwocky
+Status:
+X-UID: 2
+
+It seems very pretty, but it's *rather* hard to understand!'
+Somehow it seems to fill my head with ideas -- only I don't
+exactly know what they are! However, SOMEBODY killed SOMETHING:
+that's clear, at any rate...
+
+From gray@example.net Sat Jul 13 00:43:18 2002
+Organization: Mailutils-tests
+Received: from example.net (localhost [127.0.0.1])
+ by example.net with ESMTP id g6CLhIb05086
+ for <gray@example.net>; Sat, 13 Jul 2002 00:43:18 +0300
+Message-Id: <200207122143.g6CLhIb05086@example.net>
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Simple MIME
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
+Content-ID: <5082.1026510189.0@example.net>
+Date: Sat, 13 Jul 2002 00:43:18 +0300
+From: Sergey Poznyakoff <gray@example.net>
+Status:
+X-UID: 3
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="msg.1"; charset="us-ascii"
+Content-ID: <5082.1026510189.1@example.net>
+Content-Description: How doth
+
+How doth the little crocodile
+Improve his shining tail,
+And pour the waters of the Nile
+On every golden scale!
+
+`How cheerfully he seems to grin,
+How neatly spread his claws,
+And welcome little fishes in
+With gently smiling jaws!
+
+------- =_aaaaaaaaaa0
+Content-Type: application/octet-stream; name="msg.21"
+Content-ID: <5082.1026510189.2@example.net>
+Content-Description: Father William Part I
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCBGYXRoZXIgV2lsbGlhbSwnIHRoZSB5b3VuZyBtYW4gc2FpZCwKYEFuZCB5
+b3VyIGhhaXIgaGFzIGJlY29tZSB2ZXJ5IHdoaXRlOwpBbmQgeWV0IHlvdSBpbmNlc3NhbnRseSBz
+dGFuZCBvbiB5b3VyIGhlYWQtLQpEbyB5b3UgdGhpbmssIGF0IHlvdXIgYWdlLCBpdCBpcyByaWdo
+dD8nCgpgSW4gbXkgeW91dGgsJyBGYXRoZXIgV2lsbGlhbSByZXBsaWVkIHRvIGhpcyBzb24sCmBJ
+IGZlYXJlZCBpdCBtaWdodCBpbmp1cmUgdGhlIGJyYWluOwpCdXQsIG5vdyB0aGF0IEknbSBwZXJm
+ZWN0bHkgc3VyZSBJIGhhdmUgbm9uZSwKV2h5LCBJIGRvIGl0IGFnYWluIGFuZCBhZ2Fpbi4nCgo=
+
+------- =_aaaaaaaaaa0--
+
+From gray@example.net Sat Jul 13 00:50:58 2002
+Organization: Mailutils-tests
+Received: from example.net (localhost [127.0.0.1])
+ by example.net with ESMTP id g6CLowb05126
+ for <gray@example.net>; Sat, 13 Jul 2002 00:50:58 +0300
+Message-Id: <200207122150.g6CLowb05126@example.net>
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Nested MIME
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
+Content-ID: <5122.1026510654.1@example.net>
+Date: Sat, 13 Jul 2002 00:50:58 +0300
+From: Sergey Poznyakoff <gray@example.net>
+Status:
+X-UID: 4
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="msg.21"; charset="us-ascii"
+Content-ID: <5122.1026510654.2@example.net>
+Content-Description: Father William Part I
+
+`You are old, Father William,' the young man said,
+`And your hair has become very white;
+And yet you incessantly stand on your head--
+Do you think, at your age, it is right?'
+
+`In my youth,' Father William replied to his son,
+`I feared it might injure the brain;
+But, now that I'm perfectly sure I have none,
+Why, I do it again and again.'
+
+
+------- =_aaaaaaaaaa0
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa1"
+Content-ID: <5122.1026510654.3@example.net>
+
+------- =_aaaaaaaaaa1
+Content-Type: application/octet-stream; name="msg.22"
+Content-ID: <5122.1026510654.4@example.net>
+Content-Description: Father William Part II
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCcgc2FpZCB0aGUgeW91dGgsIGBhcyBJIG1lbnRpb25lZCBiZWZvcmUsCkFu
+ZCBoYXZlIGdyb3duIG1vc3QgdW5jb21tb25seSBmYXQ7CllldCB5b3UgdHVybmVkIGEgYmFjay1z
+b21lcnNhdWx0IGluIGF0IHRoZSBkb29yLS0KUHJheSwgd2hhdCBpcyB0aGUgcmVhc29uIG9mIHRo
+YXQ/JwoKYEluIG15IHlvdXRoLCcgc2FpZCB0aGUgc2FnZSwgYXMgaGUgc2hvb2sgaGlzIGdyZXkg
+bG9ja3MsCmBJIGtlcHQgYWxsIG15IGxpbWJzIHZlcnkgc3VwcGxlCkJ5IHRoZSB1c2Ugb2YgdGhp
+cyBvaW50bWVudC0tb25lIHNoaWxsaW5nIHRoZSBib3gtLQpBbGxvdyBtZSB0byBzZWxsIHlvdSBh
+IGNvdXBsZT8nCg==
+
+------- =_aaaaaaaaaa1
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa2"
+Content-ID: <5122.1026510654.5@example.net>
+
+------- =_aaaaaaaaaa2
+Content-Type: application/octet-stream; name="msg.23"
+Content-ID: <5122.1026510654.6@example.net>
+Content-Description: Father William Part III
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCcgc2FpZCB0aGUgeW91dGgsIGBhbmQgeW91ciBqYXdzIGFyZSB0b28gd2Vh
+awpGb3IgYW55dGhpbmcgdG91Z2hlciB0aGFuIHN1ZXQ7CllldCB5b3UgZmluaXNoZWQgdGhlIGdv
+b3NlLCB3aXRoIHRoZSBib25lcyBhbmQgdGhlIGJlYWstLQpQcmF5IGhvdyBkaWQgeW91IG1hbmFn
+ZSB0byBkbyBpdD8nCgpgSW4gbXkgeW91dGgsJyBzYWlkIGhpcyBmYXRoZXIsIGBJIHRvb2sgdG8g
+dGhlIGxhdywKQW5kIGFyZ3VlZCBlYWNoIGNhc2Ugd2l0aCBteSB3aWZlOwpBbmQgdGhlIG11c2N1
+bGFyIHN0cmVuZ3RoLCB3aGljaCBpdCBnYXZlIHRvIG15IGphdywKSGFzIGxhc3RlZCB0aGUgcmVz
+dCBvZiBteSBsaWZlLicK
+
+------- =_aaaaaaaaaa2
+Content-Type: application/octet-stream; name="msg.24"
+Content-ID: <5122.1026510654.7@example.net>
+Content-Description: Father William Part IV
+Content-Transfer-Encoding: base64
+
+YFlvdSBhcmUgb2xkLCcgc2FpZCB0aGUgeW91dGgsIGBvbmUgd291bGQgaGFyZGx5IHN1cHBvc2UK
+VGhhdCB5b3VyIGV5ZSB3YXMgYXMgc3RlYWR5IGFzIGV2ZXI7CllldCB5b3UgYmFsYW5jZWQgYW4g
+ZWVsIG9uIHRoZSBlbmQgb2YgeW91ciBub3NlLS0KV2hhdCBtYWRlIHlvdSBzbyBhd2Z1bGx5IGNs
+ZXZlcj8nCgpgSSBoYXZlIGFuc3dlcmVkIHRocmVlIHF1ZXN0aW9ucywgYW5kIHRoYXQgaXMgZW5v
+dWdoLCcKU2FpZCBoaXMgZmF0aGVyOyBgZG9uJ3QgZ2l2ZSB5b3Vyc2VsZiBhaXJzIQpEbyB5b3Ug
+dGhpbmsgSSBjYW4gbGlzdGVuIGFsbCBkYXkgdG8gc3VjaCBzdHVmZj8KQmUgb2ZmLCBvciBJJ2xs
+IGtpY2sgeW91IGRvd24gc3RhaXJzIScK
+
+------- =_aaaaaaaaaa2--
+
+------- =_aaaaaaaaaa1--
+
+------- =_aaaaaaaaaa0--
+
+From gray@example.net Sat Jul 13 00:43:18 2002
+Organization: Mailutils-tests
+Received: from example.net (localhost [127.0.0.1])
+ by example.net with ESMTP id g6CLhIb05086
+ for <gray@example.net>; Sat, 13 Jul 2002 00:43:18 +0300
+Message-Id: <200207122143.g6CLhIb05086@example.net>
+To: Foo Bar <foobar@nonexistent.net>
+Subject: Empty MIME Parts
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
+Content-ID: <5082.1026510189.0@example.net>
+Date: Sat, 13 Jul 2002 00:43:18 +0300
+From: Sergey Poznyakoff <gray@example.net>
+Status:
+X-UID: 5
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="empty"; charset="us-ascii"
+Content-ID: <5082.1026510189.1@example.net>
+Content-Description: Empty part
+
+
+------- =_aaaaaaaaaa0
+Content-Type: text/plain; name="single.line"; charset="us-ascii"
+Content-ID: <5082.1026510189.2@example.net>
+Content-Description: Single line part
+
+
+
+------- =_aaaaaaaaaa0--
+

Return to:

Send suggestions and report system problems to the System administrator.