X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fimap.t;h=e6efe04f7702c0c6a2b92f23ec8da32fbd9e77c6;hb=21fd0da3bcfba4d3564d262f88d3fd7479b6d5ee;hp=0700f5788cc6bd505a420e02dbfab098fb5738fa;hpb=3d52c093ad5ce7a32f8842d9ae020712f9786352;p=public-inbox.git
diff --git a/t/imap.t b/t/imap.t
index 0700f578..e6efe04f 100644
--- a/t/imap.t
+++ b/t/imap.t
@@ -1,29 +1,14 @@
#!perl -w
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
# 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";