]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/imap.t
update copyrights for 2021
[public-inbox.git] / t / imap.t
index 0700f5788cc6bd505a420e02dbfab098fb5738fa..0ec02818dd7dc842e63fccfeae0821ebea193352 100644 (file)
--- a/t/imap.t
+++ b/t/imap.t
@@ -1,29 +1,15 @@
 #!perl -w
-# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # unit tests (no network) for IMAP, see t/imapd.t for end-to-end tests
 use strict;
 use Test::More;
-use PublicInbox::IMAP;
-use PublicInbox::IMAPD;
 use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite));
 require_git 2.6;
-use POSIX qw(strftime);
-
-{
-       my $parse_date = \&PublicInbox::IMAP::parse_date;
-       is(strftime('%Y-%m-%d', gmtime($parse_date->('02-Oct-1993'))),
-               '1993-10-02', 'parse_date works');
-       is(strftime('%Y-%m-%d', gmtime($parse_date->('2-Oct-1993'))),
-               '1993-10-02', 'parse_date works w/o leading zero');
-
-       is($parse_date->('2-10-1993'), undef, 'bad month');
-
-       # from what I can tell, RFC 3501 says nothing about date-month
-       # case-insensitivity, so be case-sensitive for now
-       is($parse_date->('02-oct-1993'), undef, 'case-sensitive month');
-}
+require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address
+       Parse::RecDescent));
+require_ok 'PublicInbox::IMAP';
+require_ok 'PublicInbox::IMAPD';
 
 my ($tmpdir, $for_destroy) = tmpdir();
 my $cfgfile = "$tmpdir/config";