X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fimap.t;h=e6efe04f7702c0c6a2b92f23ec8da32fbd9e77c6;hb=b5454f38b1903735594e3c253617a66dd267062f;hp=83adf55338b99b8e6535958b93eafd9f278436d3;hpb=4042599799a3706d1b1c0589675b07cab610505a;p=public-inbox.git
diff --git a/t/imap.t b/t/imap.t
index 83adf553..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 v5.10.1;
use PublicInbox::TestCommon;
-require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address));
+require_git 2.6;
+require_mods(qw(-imapd));
require_ok 'PublicInbox::IMAP';
require_ok 'PublicInbox::IMAPD';
-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');
-}
my ($tmpdir, $for_destroy) = tmpdir();
my $cfgfile = "$tmpdir/config";