about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-29 09:46:19 +0000
committerEric Wong <e@80x24.org>2021-04-30 06:41:36 +0000
commit90155b72ccd38d51415f12547e39c4d65c469fe1 (patch)
tree570c61708a093f24dcba9f05d415c22a2a2cbc23 /t
parent923e09d84e8eaa612c85f6d5ec57c3742390bebc (diff)
downloadpublic-inbox-90155b72ccd38d51415f12547e39c4d65c469fe1.tar.gz
Specifying a UIDVALIDITY value allows the user to enforce
a strict match and force failure.  This necessitated changes
to NetReader to allow die() and make error reporting more
suitable for CLI usage rather than daemonized usage of -watch.
Diffstat (limited to 't')
-rw-r--r--t/lei-import-imap.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/lei-import-imap.t b/t/lei-import-imap.t
index 611328b4..c977c68e 100644
--- a/t/lei-import-imap.t
+++ b/t/lei-import-imap.t
@@ -24,6 +24,10 @@ test_lei({ tmpdir => $tmpdir }, sub {
         lei_ok('import', $url);
         lei_ok 'ls-sync';
         like($lei_out, qr!\A\Q$url\E;UIDVALIDITY=\d+\n\z!, 'ls-sync');
+        chomp(my $u = $lei_out);
+        lei_ok('import', $u, \'UIDVALIDITY match in URL');
+        $u =~ s/;UIDVALIDITY=(\d+)\s*/;UIDVALIDITY=9$1/s;
+        ok(!lei('import', $u), 'UIDVALIDITY mismatch in URL rejected');
 
         lei_ok('inspect', $url);
         my $inspect = json_utf8->decode($lei_out);