about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/imap.t10
1 files changed, 7 insertions, 3 deletions
diff --git a/t/imap.t b/t/imap.t
index fe6352b6..451b6596 100644
--- a/t/imap.t
+++ b/t/imap.t
@@ -46,17 +46,21 @@ use PublicInbox::IMAPD;
         my $partial_body = \&PublicInbox::IMAP::partial_body;
         my $partial_hdr_get = \&PublicInbox::IMAP::partial_hdr_get;
         my $partial_hdr_not = \&PublicInbox::IMAP::partial_hdr_not;
+        my $hdrs_regexp = \&PublicInbox::IMAP::hdrs_regexp;
         is_deeply($x, {
                 'BODY[9]' => [ $partial_body, 9, undef, undef, undef ],
                 'BODY[9]<5>' => [ $partial_body, 9, undef, 5, undef ],
                 'BODY[9]<5.1>' => [ $partial_body, 9, undef, 5, 1 ],
                 'BODY[1.1]' => [ $partial_body, '1.1', undef, undef, undef ],
                 'BODY[HEADER.FIELDS (DATE FROM)]' => [ $partial_hdr_get,
-                                        undef, 'DATE FROM', undef, undef ],
+                                        undef, $hdrs_regexp->('DATE FROM'),
+                                        undef, undef ],
                 'BODY[HEADER.FIELDS.NOT (TO)]' => [ $partial_hdr_not,
-                                                undef, 'TO', undef, undef ],
+                                                undef, $hdrs_regexp->('TO'),
+                                                undef, undef ],
                 'BODY[1.1.HEADER.FIELDS (TO)]' => [ $partial_hdr_get,
-                                                '1.1', 'TO', undef, undef ],
+                                                '1.1', $hdrs_regexp->('TO'),
+                                                undef, undef ],
         }, 'structure matches expected');
 }