]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-import-imap.t
No ext_urls
[public-inbox.git] / t / lei-import-imap.t
index 12f6fad0bd88a075f7dcd0a10ae57cff18436d8a..3b6cb29926eee322355365631ff636c3d261eb3b 100644 (file)
@@ -43,6 +43,7 @@ test_lei({ tmpdir => $tmpdir }, sub {
        $url = $u;
        $u =~ s/;UIDVALIDITY=(\d+)\s*/;UIDVALIDITY=9$1/s;
        ok(!lei('import', $u), 'UIDVALIDITY mismatch in URL rejected');
+       like($lei_err, qr/UIDVALIDITY mismatch/, 'mismatch noted');
 
        lei_ok('inspect', $url);
        my $inspect = json_utf8->decode($lei_out);
@@ -109,6 +110,9 @@ test_lei({ tmpdir => $tmpdir }, sub {
        is(scalar(@$out), 2, 'got JSON') or diag explain($out);
        lei_ok qw(lcat), $url_orig;
        is($lei_out, $orig, 'lcat w/o UID works');
+
+       ok(!lei(qw(export-kw), $url_orig), 'export-kw fails on read-only IMAP');
+       like($lei_err, qr/does not support/, 'error noted in failure');
 });
 
 done_testing;