X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Finit.t;h=dad094358381a5bb4773aab3f0410962f45969f3;hp=4d2c50496fc92b15bdf7b95521c77d0c58d10905;hb=f344d64066f85dd6737daeb42c94902e1bbfda78;hpb=f62ddb19552b19f398d56193d7cf20cf20b61a04 diff --git a/t/init.t b/t/init.t index 4d2c5049..dad09435 100644 --- a/t/init.t +++ b/t/init.t @@ -95,6 +95,19 @@ SKIP: { 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"); } # loop for idempotency