From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6315 166.70.0.0/16 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A4AC8208E9; Wed, 1 Aug 2018 16:45:56 +0000 (UTC) Received: from in01.mta.xmission.com ([166.70.13.51]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fkuG3-0001xi-VD; Wed, 01 Aug 2018 10:45:56 -0600 Received: from [97.119.167.31] (helo=x220.int.ebiederm.org) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.87) (envelope-from ) id 1fkuG2-0001mm-Pm; Wed, 01 Aug 2018 10:45:55 -0600 From: "Eric W. Biederman" To: Eric Wong Cc: meta@public-inbox.org, "Eric W. Biederman" Date: Wed, 1 Aug 2018 11:43:40 -0500 Message-Id: <20180801164344.7911-9-ebiederm@xmission.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <878t5qkpis.fsf@xmission.com> References: <878t5qkpis.fsf@xmission.com> X-XM-SPF: eid=1fkuG2-0001mm-Pm;;;mid=<20180801164344.7911-9-ebiederm@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19oqLUZ1zn42UrF756eDRkSv4X0uARoR+0= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: [PATCH 09/13] t/v[12]reindex.t Verify num_highwater X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) List-Id: Signed-off-by: "Eric W. Biederman" --- t/v1reindex.t | 7 +++++++ t/v2reindex.t | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/t/v1reindex.t b/t/v1reindex.t index 8e78aa761333..876c9db3441a 100644 --- a/t/v1reindex.t +++ b/t/v1reindex.t @@ -246,6 +246,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 4, 'max as expected'); + is($ibx->mm->num_highwater, 4, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -269,6 +270,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 3, 'max as expected'); + is($ibx->mm->num_highwater, 4, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -291,6 +293,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -319,6 +322,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -352,6 +356,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 3, 'max as expected'); + is($ibx->mm->num_highwater, 4, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -374,6 +379,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -402,6 +408,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], diff --git a/t/v2reindex.t b/t/v2reindex.t index ce13a07c39c0..3d217aff3c72 100644 --- a/t/v2reindex.t +++ b/t/v2reindex.t @@ -237,6 +237,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 4, 'max as expected'); + is($ibx->mm->num_highwater, 4, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -260,6 +261,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 3, 'max as expected'); + is($ibx->mm->num_highwater, 4, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -282,6 +284,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -310,6 +313,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -343,6 +347,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 3, 'max as expected'); + is($ibx->mm->num_highwater, 4, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -365,6 +370,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], @@ -393,6 +399,7 @@ ok(!-d $xap, 'Xapian directories removed again'); my ($min, $max) = $ibx->mm->minmax; is($min, 1, 'min as expected'); is($max, 10, 'max as expected'); + is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); is_deeply($ibx->mm->msg_range(\$min, $max), [ [1, '1@example.com' ], -- 2.17.1