From 9d0f17840479508de4aaf76fe6c150e94a9f79c3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Sep 2021 12:50:33 +0000 Subject: lei config --edit: use controlling terminal As with "lei edit-search", "lei config --edit" may spawn an interactive editor which works best from the terminal running script/lei. So implement LeiConfig as a superclass of LeiEditSearch so the two commands can share the same verification hooks and retry logic. --- t/lei.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 't') diff --git a/t/lei.t b/t/lei.t index c8f47576..53fc43fb 100644 --- a/t/lei.t +++ b/t/lei.t @@ -100,6 +100,9 @@ my $test_config = sub { is($lei_out, "tr00\n", "-c string value passed as-is"); 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' }); + is($lei_out, "[a]\n\tb = c\n", '--edit works'); }; my $test_completion = sub { -- cgit v1.2.3-24-ge0c7