@@ 176,7 176,10 @@ sub explain_overlap {
my ($self_name, $other_name)
= ($self->name || $self, $other->name || $other);
if ($self->first_row > $other->first_row) {
if (! ($self->overlaps($other))) {
return 'Tables are disjoint.';
}
elsif ($self->first_row > $other->first_row) {
return $other->explain_overlap($self);
}
elsif ($self->first_row == $other->first_row) {
@@ 3,7 3,7 @@
use strict;
use warnings;
-use Test::More tests => 28;
+use Test::More tests => 29;
use Spreadsheet::Table::Extract;
use Spreadsheet::Read;
@@ 124,6 124,8 @@ is($all_tables->[0]->explain_overlap($all_tables->[1]),
$check_table->make_disjoint($all_tables);
is_deeply([ map { $_->last_row; } @$all_tables ], [ 29, 40, 40],
"disjoint tables have correct final rows");
+is($all_tables->[0]->explain_overlap($all_tables->[1]), 'Tables are disjoint.',
+ 'explain_overlap reports they are disjoint');
# Once again, we get the right number of entries.
@entries = $all_tables->[0]->extract
($book->[1], 'Spreadsheet::Table::Test::CheckbookEntry');