* [PATCH] t/lei-import-imap: bail on missing UIDVALIDITY after import
@ 2024-09-26 10:56 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-09-26 10:56 UTC (permalink / raw)
To: meta
I haven't been able to reproduce it, but I've seen the test
fail because ls-mail-sync didn't emit anything which matched
/;UIDVALIDITY=(\d+)\s*/. Add some diagnostics and bail out
right away if it happens again.
---
t/lei-import-imap.t | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/lei-import-imap.t b/t/lei-import-imap.t
index 3b6cb299..a835e82f 100644
--- a/t/lei-import-imap.t
+++ b/t/lei-import-imap.t
@@ -39,9 +39,10 @@ test_lei({ tmpdir => $tmpdir }, sub {
lei_ok 'ls-mail-sync';
like($lei_out, qr!$re\n\z!, 'ls-mail-sync');
chomp(my $u = $lei_out);
- lei_ok('import', $u, \'UIDVALIDITY match in URL');
$url = $u;
- $u =~ s/;UIDVALIDITY=(\d+)\s*/;UIDVALIDITY=9$1/s;
+ $u =~ s/;UIDVALIDITY=(\d+)\s*/;UIDVALIDITY=9$1/s or
+ xbail 'no UIDVALIDITY=\\d+ in URL=', \$u, 'lei_out=', \$lei_out;
+ lei_ok('import', $url, \'UIDVALIDITY match in URL');
ok(!lei('import', $u), 'UIDVALIDITY mismatch in URL rejected');
like($lei_err, qr/UIDVALIDITY mismatch/, 'mismatch noted');
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-26 10:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 10:56 [PATCH] t/lei-import-imap: bail on missing UIDVALIDITY after import Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).