From 1597d1a5fff6c1090cc65f439d1773cb3e98d382 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Wed, 1 Aug 2018 11:43:40 -0500 Subject: t/v[12]reindex.t Verify num_highwater Signed-off-by: "Eric W. Biederman" --- t/v1reindex.t | 7 +++++++ t/v2reindex.t | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 't') diff --git a/t/v1reindex.t b/t/v1reindex.t index 8e78aa76..876c9db3 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 ce13a07c..3d217aff 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' ], -- cgit v1.2.3-24-ge0c7