about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-19 12:50:33 +0000
committerEric Wong <e@80x24.org>2021-09-19 19:53:03 +0000
commit9d0f17840479508de4aaf76fe6c150e94a9f79c3 (patch)
tree9065f32b760acbb8e4285600e4be01ebe631476a /t
parent20c940a876728fe91892200dd874dd917cd677ac (diff)
downloadpublic-inbox-9d0f17840479508de4aaf76fe6c150e94a9f79c3.tar.gz
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.
Diffstat (limited to 't')
-rw-r--r--t/lei.t3
1 files changed, 3 insertions, 0 deletions
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 {