We should not have "SCALAR(XXXXXXX)" showing up in SQLite DBs
because we passed a SCALAR ref instead of a non-ref SCALAR.
warn "# $uri fetching ARTICLE $beg..$end\n";
}
my $n = $self->{max_batch};
warn "# $uri fetching ARTICLE $beg..$end\n";
}
my $n = $self->{max_batch};
for ($beg..$end) {
last if $self->{quit};
$art = $_;
for ($beg..$end) {
last if $self->{quit};
$art = $_;
$raw = join('', @$raw);
$raw =~ s/\r\n/\n/sg;
my ($eml_cb, @args) = @{$self->{eml_each}};
$raw = join('', @$raw);
$raw =~ s/\r\n/\n/sg;
my ($eml_cb, @args) = @{$self->{eml_each}};
- $eml_cb->($uri, $art, $kw, PublicInbox::Eml->new(\$raw), @args);
+ $eml_cb->($url, $art, $kw, PublicInbox::Eml->new(\$raw), @args);
$last_art = $art;
}
run_commit_cb($self);
$last_art = $art;
}
run_commit_cb($self);
lei_ok(qw(q z:1..));
my $out = json_utf8->decode($lei_out);
is_deeply($out, [ undef ], 'nothing imported, yet');
lei_ok(qw(q z:1..));
my $out = json_utf8->decode($lei_out);
is_deeply($out, [ undef ], 'nothing imported, yet');
- lei_ok('import', "nntp://$host_port/t.v2");
- diag $lei_err;
+ my $url = "nntp://$host_port/t.v2";
+ lei_ok('import', $url);
$out = json_utf8->decode($lei_out);
ok(scalar(@$out) > 1, 'got imported messages');
is(pop @$out, undef, 'trailing JSON null element was null');
$out = json_utf8->decode($lei_out);
ok(scalar(@$out) > 1, 'got imported messages');
is(pop @$out, undef, 'trailing JSON null element was null');
my $f = "$ENV{HOME}/.local/share/lei/store/mail_sync.sqlite3";
ok(-s $f, 'mail_sync exists tracked for redundant imports');
my $f = "$ENV{HOME}/.local/share/lei/store/mail_sync.sqlite3";
ok(-s $f, 'mail_sync exists tracked for redundant imports');
+ lei_ok 'ls-mail-sync';
+ like($lei_out, qr!\A\Q$url\E\n\z!, 'ls-mail-sync output as-expected');