X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fedit.t;h=2803dd01bbc69e4f4921c02ac85c10c338d28023;hb=daab9cf0b8fcd66d1cb7f62f7ea9a8b0e32320ef;hp=02df6cda68e3d75f3899becc227b62c1935a4d11;hpb=ad6f26f3b9f0e428020d05667987556f8fcbec2f;p=public-inbox.git diff --git a/t/edit.t b/t/edit.t index 02df6cda..2803dd01 100644 --- a/t/edit.t +++ b/t/edit.t @@ -1,22 +1,17 @@ -# Copyright (C) 2019 all contributors +# Copyright (C) 2019-2020 all contributors # License: AGPL-3.0+ # edit frontend behavior test (t/replace.t for backend) use strict; use warnings; use Test::More; -require './t/common.perl'; +use PublicInbox::TestCommon; require_git(2.6); require PublicInbox::Inbox; require PublicInbox::InboxWritable; require PublicInbox::Config; use PublicInbox::MID qw(mid_clean); -my @mods = qw(DBI DBD::SQLite); -foreach my $mod (@mods) { - eval "require $mod"; - plan skip_all => "missing $mod for $0" if $@; -}; - +require_mods('DBD::SQLite'); my ($tmpdir, $for_destroy) = tmpdir(); my $inboxdir = "$tmpdir/v2"; my $ibx = PublicInbox::Inbox->new({ @@ -129,7 +124,6 @@ $t = 'mailEditor set in config'; { is($rc, 0, 'set publicinbox.mailEditor'); local $ENV{MAIL_EDITOR}; delete $ENV{MAIL_EDITOR}; - delete local $ENV{MAIL_EDITOR}; local $ENV{GIT_EDITOR} = 'echo should not run'; $cmd = [ '-edit', "-m$mid", $inboxdir ]; ok(run_script($cmd, undef, $opt), "$t edited message");