From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 76C761F4D0 for ; Sat, 14 Dec 2024 14:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1734188285; bh=haFlI8arsUqc/LnR+mfRwwkP8SDpkM2lRGJv99WJUeg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Vr9pJbftEB7vcaqPR/PsiqSNJ7ShzV7SvshbUXRs2VSFcJnw4B96y6/veMM7Mm8TI dh4N1Go2nzzD12V9wEkkq8ITTr6ms4+82Q/qVwvnLLirYoQ0ZuziEQKCrMTNSqNsFQ mYXPtK28/n547C2j09ZMgNKg/S3BhuV8ToVV9h1k= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/3] t/extindex: add --max-size test Date: Sat, 14 Dec 2024 14:58:02 +0000 Message-ID: <20241214145805.755893-2-e@80x24.org> In-Reply-To: <20241214145805.755893-1-e@80x24.org> References: <20241214145805.755893-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: I noticed this missing coverage while working on another series of changes which aren't quite ready, yet. --- t/extsearch.t | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/extsearch.t b/t/extsearch.t index 1a212bc8..7b75c208 100644 --- a/t/extsearch.t +++ b/t/extsearch.t @@ -703,4 +703,16 @@ EOF is $args[0]->size, 0, 'isrch->async_mset altid miss works'; } +if ('max-size') { + my $dir = "$home/extindex-max"; + my $rdr = { 2 => \(my $err) }; + ok run_script([qw(-extindex --max-size=500 --all -vvv), $dir], + undef, $rdr), 'extindex with max-size'; + my $es = PublicInbox::ExtSearch->new($dir); + my $mset = $es->mset('z:500..'); + is $mset->size, 0, 'no hits w/ max-size=500'; + like $err, qr/ skipping [a-f0-9]{40,} .*? > 500\b/, + 'noted skipping messages in stderr'; +} + done_testing;