is_deeply(json_utf8->decode($lei_out), {}, 'no inspect stats, yet');
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);
is_deeply(\%r, { 'HASH' => scalar(@$out) }, 'all hashes');
lei_ok([qw(tag +kw:seen), $url], undef, undef);
- my $f = "$ENV{HOME}/.local/share/lei/store/net_last.sqlite3";
- ok(-s $f, 'net tracked for redundant imports');
+ my $f = "$ENV{HOME}/.local/share/lei/store/mail_sync.sqlite3";
+ ok(-s $f, 'mail_sync tracked for redundant imports');
lei_ok('inspect', "blob:$out->[5]->{blob}");
my $x = json_utf8->decode($lei_out);
is(ref($x->{'lei/store'}), 'ARRAY', 'lei/store in inspect');
is(ref($x->{sync}), 'HASH', 'sync in inspect');
is(ref($x->{sync}->{$k[0]}), 'ARRAY', 'UID arrays in inspect');
+
+ my $psgi_attach = 'cfa3622cbeffc9bd6b0fc66c4d60d420ba74f60d';
+ lei_ok('blob', $psgi_attach);
+ like($lei_out, qr!^Content-Type: multipart/mixed;!sm, 'got full blob');
+ lei_ok('blob', "$psgi_attach:2");
+ is($lei_out, "b64\xde\xad\xbe\xef\n", 'got attachment');
});
done_testing;