]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/lei*: set EDITOR for dumb terminals
authorEric Wong <e@80x24.org>
Sat, 16 Oct 2021 07:54:03 +0000 (07:54 +0000)
committerEric Wong <e@80x24.org>
Sat, 16 Oct 2021 07:56:31 +0000 (07:56 +0000)
Running tests over a non-interactive ssh session fails,
otherwise.

t/lei-q-remote-import.t
t/lei.t

index fdf6a11e3b574e5b32e736881c7849e6ea18156d..92d8c9b6058c3cac5932b0a78dd58ee9b8d1c362 100644 (file)
@@ -99,7 +99,7 @@ EOF
        lei_ok('up', "$ENV{HOME}/md");
        is_deeply(\@f, [ glob("$ENV{HOME}/md/*/*") ],
                'lei up remote dedupe works on maildir');
-       my $edit_env = { VISUAL => 'cat' };
+       my $edit_env = { VISUAL => 'cat', EDITOR => 'cat' };
        lei_ok([qw(edit-search), "$ENV{HOME}/md"], $edit_env);
        like($lei_out, qr/^\Q[external "$url"]\E\n\s*lastresult = \d+/sm,
                'lastresult set');
diff --git a/t/lei.t b/t/lei.t
index 53fc43fbbb0a2d5db62284612a23fd87fc446543..f7de1b711a836827b5fdbbff40473ad408eb3fce 100644 (file)
--- a/t/lei.t
+++ b/t/lei.t
@@ -101,7 +101,7 @@ my $test_config = sub {
        lei_ok(qw(-c imap.debug=a -c imap.debug=b config --get-all imap.debug));
        is($lei_out, "a\nb\n", '-c and --get-all work together');
 
-       lei_ok([qw(config -e)], { VISUAL => 'cat' });
+       lei_ok([qw(config -e)], { VISUAL => 'cat', EDITOR => 'cat' });
        is($lei_out, "[a]\n\tb = c\n", '--edit works');
 };