about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-03-02 09:13:07 +0000
committerEric Wong <e@80x24.org>2021-03-02 21:05:36 +0000
commite01956b6cef0db5e82e2637fe5e565f4560f9fd5 (patch)
tree707f33bbc5539173d2122558103f4e5f4301a374 /t
parent5b0ff78b53a796a54f8a8d7402bd04bcd2235b14 (diff)
downloadpublic-inbox-e01956b6cef0db5e82e2637fe5e565f4560f9fd5.tar.gz
inbox: ->mailboxid accessor
This will be necessary for "mailboxIds" as described in RFCs 8620 and
8621 (for JMAP).  We may implement "MAILBOXID" in RFC 8474 for IMAP,
as well.
Diffstat (limited to 't')
-rw-r--r--t/inbox.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/inbox.t b/t/inbox.t
index bc8fae9a..b7239e6d 100644
--- a/t/inbox.t
+++ b/t/inbox.t
@@ -32,4 +32,11 @@ is(unlink(glob("$x->{inboxdir}/*")), 2, 'unlinked cloneurl & description');
 is_deeply($x->cloneurl, ['https://example.com/inbox'], 'cloneurls memoized');
 is($x->description, "\x{100}blah", 'description memoized');
 
+$x->{name} = "2\x{100}wide";
+$x->{newsgroup} = '2.wide';
+like($x->mailboxid, qr/\AM32c48077696465-[0-9a-f]+\z/,
+        '->mailboxid w/o slice (JMAP)');
+like($x->mailboxid(78), qr/\AM322e77696465-4e-[0-9a-f]+\z/,
+        '->mailboxid w/ slice (IMAP)');
+
 done_testing();