'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 {
%out = map { $_ => 1 } split(/\s+/s, $lei_out);
for my $sw (qw(-f --format -o --output --mfolder --augment -a
--mua --no-local --local --verbose -v
- --save-as --no-remote --remote --torsocks
+ --save --no-save --no-remote --remote --torsocks
--reverse -r )) {
ok($out{$sw}, "$sw offered as `lei q' completion");
}
}
lei_ok(qw(_complete lei import));
%out = map { $_ => 1 } split(/\s+/s, $lei_out);
- for my $sw (qw(--flags --no-flags --no-kw --kw --no-keywords
- --keywords)) {
+ for my $sw (qw(--no-kw --kw)) {
ok($out{$sw}, "$sw offered as `lei import' completion");
}
};
"error noted with q $fl");
}
}
+ lei_ok('sucks', \'yes, but hopefully less every day');
+ like($lei_out, qr/loaded features/, 'loaded features shown');
SKIP: {
skip 'no curl', 3 unless which('curl');
lei(qw(q --only http://127.0.0.1:99999/bogus/ t:m));