]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei.t
lei: support -c <name>=<value> to overrides
[public-inbox.git] / t / lei.t
diff --git a/t/lei.t b/t/lei.t
index 2bf4b862557dd8ca6d4599b9d81907064cded29c..0cf97866f8fbf474def66573992d28c37c72ca64 100644 (file)
--- a/t/lei.t
+++ b/t/lei.t
@@ -93,6 +93,15 @@ my $test_config = sub {
                        'config set var with -f fails');
        like($lei_err, qr/not supported/, 'not supported noted');
        ok(!-f "$home/config/f", 'no file created');
+
+       lei_ok(qw(-c imap.debug config --bool imap.debug));
+       is($lei_out, "true\n", "-c sets w/o value");
+       lei_ok(qw(-c imap.debug=1 config --bool imap.debug));
+       is($lei_out, "true\n", "-c coerces value");
+       lei_ok(qw(-c imap.debug=tr00 config imap.debug));
+       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');
 };
 
 my $test_completion = sub {