]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/imap.t
www: drop --subject from "git send-email" instructions
[public-inbox.git] / t / imap.t
index 0700f5788cc6bd505a420e02dbfab098fb5738fa..e6efe04f7702c0c6a2b92f23ec8da32fbd9e77c6 100644 (file)
--- a/t/imap.t
+++ b/t/imap.t
@@ -1,29 +1,14 @@
 #!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 v5.10.1;
 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(-imapd));
+require_ok 'PublicInbox::IMAP';
+require_ok 'PublicInbox::IMAPD';
 
 my ($tmpdir, $for_destroy) = tmpdir();
 my $cfgfile = "$tmpdir/config";