my $ibx = PublicInbox::Inbox->new({ inboxdir => $dir });
is(PublicInbox::Admin::detect_indexlevel($ibx), $lvl,
'detected expected level w/o config');
+ ok(!$ibx->{-skip_docdata}, 'docdata written by default');
+ }
+ for my $v (1, 2) {
+ my $name = "v$v-skip-docdata";
+ my $dir = "$tmpdir/$name";
+ $cmd = [ '-init', $name, "-V$v", '--skip-docdata',
+ $dir, "http://example.com/$name",
+ "$name\@example.com" ];
+ ok(run_script($cmd), "-init -V$v --skip-docdata");
+ my $ibx = PublicInbox::Inbox->new({ inboxdir => $dir });
+ is(PublicInbox::Admin::detect_indexlevel($ibx), 'full',
+ "detected default indexlevel -V$v");
+ ok($ibx->{-skip_docdata}, "docdata skip set -V$v");
+ ok($ibx->search->has_threadid, 'has_threadid flag set on new inbox');
}
# loop for idempotency
'publicinboxmda.spamcheck', 'none') == 0 or
BAIL_OUT "git config $?";
my $addr = 'skip3@example.com';
- $cmd = [ qw(-init -V2 -Lbasic -N12 skip3), "$tmpdir/skip3",
+ $cmd = [ qw(-init -V2 -Lbasic --skip-artnum=12 skip3), "$tmpdir/skip3",
qw(http://example.com/skip3), $addr ];
ok(run_script($cmd), '--skip-artnum -V2');
my $env = { ORIGINAL_RECIPIENT => $addr };
$addr = 'skip4@example.com';
$env = { ORIGINAL_RECIPIENT => $addr };
- $cmd = [ qw(-init -V1 -N12 -Lmedium skip4), "$tmpdir/skip4",
+ $cmd = [ qw(-init -V1 --skip-artnum 12 -Lmedium skip4), "$tmpdir/skip4",
qw(http://example.com/skip4), $addr ];
ok(run_script($cmd), '--skip-artnum -V1');
$err = '';