]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei.t
No ext_urls
[public-inbox.git] / t / lei.t
diff --git a/t/lei.t b/t/lei.t
index c8f475762153c05d58dc77fcdfa935472bc956ab..a80143ef5cf6f58e3055f67e823367aacf40e803 100644 (file)
--- 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', EDITOR => 'cat' });
+       is($lei_out, "[a]\n\tb = c\n", '--edit works');
 };
 
 my $test_completion = sub {
@@ -140,9 +143,13 @@ my $test_fail = sub {
        lei('-C', '/dev/null', 'q', 'whatever');
        is($? >> 8, 1, 'chdir at beginning fails to /dev/null');
 
+       lei_ok('q', "foo\n");
+       like($lei_err, qr/trailing `\\n' removed/s, "noted `\\n' removal");
+
        for my $lk (qw(ei inbox)) {
                my $d = "$home/newline\n$lk";
-               mkdir $d;
+               my $all = $lk eq 'ei' ? 'ALL' : 'all';
+               File::Path::mkpath("$d/$all.git/objects");
                open my $fh, '>', "$d/$lk.lock" or BAIL_OUT "open $d/$lk.lock";
                for my $fl (qw(-I --only)) {
                        ok(!lei('q', $fl, $d, 'whatever'),