Skip to content

Commit

Permalink
Tests and fixes for RT bug 73287 (thanks to Andrew Solomon)
Browse files Browse the repository at this point in the history
Bump version number
  • Loading branch information
davorg committed Dec 15, 2011
1 parent 763c4da commit 22c8987
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Build.PL
Expand Up @@ -7,6 +7,9 @@ my $build = Module::Build->new(
Carp => 0,
Moose => 0,
},
build_requires => {
Test::NoWarnings => 0,
},
build_recommends => {
Test::Pod => 0,
Test::Pod::Coverage => 0,
Expand Down
6 changes: 3 additions & 3 deletions lib/Array/Compare.pm
Expand Up @@ -186,7 +186,7 @@ our ($VERSION, $AUTOLOAD);
use Moose;
use Carp;

$VERSION = '2.01';
$VERSION = '2.02';

has Sep => ( is => 'rw', isa => 'Str', default => '^G' );
has WhiteSpace => ( is => 'rw', isa => 'Bool', default => 1 );
Expand Down Expand Up @@ -332,8 +332,8 @@ sub simple_compare {
# character. Hopefully we can then just do a string comparison.
# Note: this makes the function liable to errors if your arrays
# contain the separator character.
my $str1 = join($self->Sep, @{$row1}[@check]);
my $str2 = join($self->Sep, @{$row2}[@check]);
my $str1 = join($self->Sep, map { defined $_ ? $_ : '' } @{$row1}[@check]);
my $str2 = join($self->Sep, map { defined $_ ? $_ : '' } @{$row2}[@check]);

# If whitespace isn't significant, collapse it
unless ($self->WhiteSpace) {
Expand Down
12 changes: 11 additions & 1 deletion t/test.t
@@ -1,5 +1,6 @@

use Test::More tests => 30;
use Test::More 'no_plan';
use Test::NoWarnings;

use_ok('Array::Compare');

Expand Down Expand Up @@ -132,3 +133,12 @@ ok($comp->compare(\@L, \@M));

$comp->DefFull(1);
ok(not $comp->compare(\@L, \@M));

my @N = (undef, 1 .. 3);
my @O = (undef, 1 .. 3);

$comp->DefFull(0);
ok($comp->compare(\@N, \@O));

$comp->DefFull(1);
ok(not $comp->compare(\@N, \@O));

0 comments on commit 22c8987

Please sign in to comment.