Skip to content

Commit d45cc9a

Browse files
bingoskhwilliamson
authored andcommitted
Update Test-Simple to CPAN version 1.302067
[DELTA] 1.302067 2016-11-23 07:37:56-08:00 America/Los_Angeles - Fix context test for recent blead. 1.302066 2016-11-08 07:58:39-08:00 America/Los_Angeles (TRIAL RELEASE) - Handle cases where SysV IPC can be available but not enabled - Import 'context' into Test2::IPC, it is used by 'cull' - Propogate warnings settings to use_ok (#736) 1.302065 2016-10-30 11:54:37-07:00 America/Los_Angeles (TRIAL RELEASE) - Set the TEST_ACTIVE env var to true - Set the TEST2_ACTIVE env var to true - Fix the oldest bug still in the bug list (#6) This fixes cmp_ok output is some confusing cases - Update travis config - Add missing author deps - Fix handling of negative pid's on windows - Add can() to Test::Tester::Delegate (despite deprecation) - Fix some minor test issues 1.302064 2016-10-24 21:03:24-07:00 America/Los_Angeles (TRIAL RELEASE) - Repo management improvements - Better handling of info vs diag in ->send_event - Fix test that used 'parent' - Better handling of non-bumping failures (#728) 1.302063 2016-10-23 21:31:20-07:00 America/Los_Angeles (TRIAL RELEASE) - Fix double release when 'throw' is used in context_do()
1 parent 440f3ee commit d45cc9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+263
-115
lines changed

MANIFEST

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,6 +2704,8 @@ cpan/Test-Simple/t/Legacy/plan_shouldnt_import.t
27042704
cpan/Test-Simple/t/Legacy/plan_skip_all.t
27052705
cpan/Test-Simple/t/Legacy/Regression/637.t
27062706
cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t
2707+
cpan/Test-Simple/t/Legacy/Regression/6_cmp_ok.t
2708+
cpan/Test-Simple/t/Legacy/Regression/736_use_ok.t
27072709
cpan/Test-Simple/t/Legacy/require_ok.t
27082710
cpan/Test-Simple/t/Legacy/run_test.t
27092711
cpan/Test-Simple/t/Legacy/simple.t
@@ -2748,6 +2750,7 @@ cpan/Test-Simple/t/Legacy/useing.t
27482750
cpan/Test-Simple/t/Legacy/utf8.t
27492751
cpan/Test-Simple/t/Legacy/versions.t
27502752
cpan/Test-Simple/t/Legacy_And_Test2/builder_loaded_late.t
2753+
cpan/Test-Simple/t/Legacy_And_Test2/hidden_warnings.t
27512754
cpan/Test-Simple/t/lib/Dev/Null.pm
27522755
cpan/Test-Simple/t/lib/Dummy.pm
27532756
cpan/Test-Simple/t/lib/MyOverload.pm

Porting/Maintainers.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ package Maintainers;
11751175
},
11761176

11771177
'Test::Simple' => {
1178-
'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302062.tar.gz',
1178+
'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302067.tar.gz',
11791179
'FILES' => q[cpan/Test-Simple],
11801180
'EXCLUDED' => [
11811181
qr{^examples/},

cpan/Test-Simple/lib/Test/Builder.pm

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.006;
44
use strict;
55
use warnings;
66

7-
our $VERSION = '1.302062';
7+
our $VERSION = '1.302067';
88

99
BEGIN {
1010
if( $] < 5.008 ) {
@@ -238,6 +238,7 @@ sub finalize {
238238
my $plan = $chub->plan || 0;
239239
my $count = $chub->count;
240240
my $failed = $chub->failed;
241+
my $passed = $chub->is_passing;
241242

242243
my $num_extra = $plan =~ m/\D/ ? 0 : $count - $plan;
243244
if ($count && $num_extra != 0) {
@@ -257,6 +258,12 @@ Looks like you failed $failed test$s of $count$qualifier.
257258
FAIL
258259
}
259260

261+
if (!$passed && !$failed && $count && !$num_extra) {
262+
$st_ctx->diag(<<"FAIL");
263+
All assertions inside the subtest passed, but errors were encountered.
264+
FAIL
265+
}
266+
260267
$st_ctx->release;
261268

262269
unless ($chub->bailed_out) {
@@ -919,7 +926,20 @@ END
919926
$self->_is_diag( $got, $type, $expect );
920927
}
921928
elsif( $type =~ /^(ne|!=)$/ ) {
922-
$self->_isnt_diag( $got, $type );
929+
no warnings;
930+
my $eq = ($got eq $expect || $got == $expect)
931+
&& (
932+
(defined($got) xor defined($expect))
933+
|| (length($got) != length($expect))
934+
);
935+
use warnings;
936+
937+
if ($eq) {
938+
$self->_cmp_diag( $got, $type, $expect );
939+
}
940+
else {
941+
$self->_isnt_diag( $got, $type );
942+
}
923943
}
924944
else {
925945
$self->_cmp_diag( $got, $type, $expect );
@@ -1550,6 +1570,7 @@ sub _ending {
15501570
my $plan = $hub->plan;
15511571
my $count = $hub->count;
15521572
my $failed = $hub->failed;
1573+
my $passed = $hub->is_passing;
15531574
return unless $plan || $count || $failed;
15541575

15551576
# Ran tests but never declared a plan or hit done_testing
@@ -1622,13 +1643,22 @@ Looks like you failed $failed test$s of $count$qualifier.
16221643
FAIL
16231644
}
16241645

1646+
if (!$passed && !$failed && $count && !$num_extra) {
1647+
$ctx->diag(<<"FAIL");
1648+
All assertions passed, but errors were encountered.
1649+
FAIL
1650+
}
1651+
16251652
my $exit_code = 0;
16261653
if ($failed) {
16271654
$exit_code = $failed <= 254 ? $failed : 254;
16281655
}
16291656
elsif ($num_extra != 0) {
16301657
$exit_code = 255;
16311658
}
1659+
elsif (!$passed) {
1660+
$exit_code = 255;
1661+
}
16321662

16331663
$$new ||= $exit_code;
16341664
return;

cpan/Test-Simple/lib/Test/Builder/Formatter.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package Test::Builder::Formatter;
22
use strict;
33
use warnings;
44

5-
our $VERSION = '1.302062';
5+
our $VERSION = '1.302067';
66

77
BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) }
88

cpan/Test-Simple/lib/Test/Builder/Module.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use Test::Builder;
77
require Exporter;
88
our @ISA = qw(Exporter);
99

10-
our $VERSION = '1.302062';
10+
our $VERSION = '1.302067';
1111

1212

1313
=head1 NAME

cpan/Test-Simple/lib/Test/Builder/Tester.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package Test::Builder::Tester;
22

33
use strict;
4-
our $VERSION = '1.302062';
4+
our $VERSION = '1.302067';
55

66
use Test::Builder;
77
use Symbol;

cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package Test::Builder::Tester::Color;
22

33
use strict;
4-
our $VERSION = '1.302062';
4+
our $VERSION = '1.302067';
55

66
require Test::Builder::Tester;
77

cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package Test::Builder::TodoDiag;
22
use strict;
33
use warnings;
44

5-
our $VERSION = '1.302062';
5+
our $VERSION = '1.302067';
66

77
BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
88

cpan/Test-Simple/lib/Test/More.pm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sub _carp {
1717
return warn @_, " at $file line $line\n";
1818
}
1919

20-
our $VERSION = '1.302062';
20+
our $VERSION = '1.302067';
2121

2222
use Test::Builder::Module;
2323
our @ISA = qw(Test::Builder::Module);
@@ -976,7 +976,10 @@ sub use_ok ($;@) {
976976
@imports = () unless @imports;
977977
my $tb = Test::More->builder;
978978

979-
my( $pack, $filename, $line ) = caller;
979+
my %caller;
980+
@caller{qw/pack file line sub args want eval req strict warn/} = caller(0);
981+
982+
my ($pack, $filename, $line, $warn) = @caller{qw/pack file line warn/};
980983
$filename =~ y/\n\r/_/; # so it doesn't run off the "#line $line $f" line
981984

982985
my $code;
@@ -985,7 +988,7 @@ sub use_ok ($;@) {
985988
# for it to work with non-Exporter based modules.
986989
$code = <<USE;
987990
package $pack;
988-
991+
BEGIN { \${^WARNING_BITS} = \$args[-1] if defined \$args[-1] }
989992
#line $line $filename
990993
use $module $imports[0];
991994
1;
@@ -994,14 +997,14 @@ USE
994997
else {
995998
$code = <<USE;
996999
package $pack;
997-
1000+
BEGIN { \${^WARNING_BITS} = \$args[-1] if defined \$args[-1] }
9981001
#line $line $filename
9991002
use $module \@{\$args[0]};
10001003
1;
10011004
USE
10021005
}
10031006

1004-
my( $eval_result, $eval_error ) = _eval( $code, \@imports );
1007+
my ($eval_result, $eval_error) = _eval($code, \@imports, $warn);
10051008
my $ok = $tb->ok( $eval_result, "use $module;" );
10061009

10071010
unless($ok) {

cpan/Test-Simple/lib/Test/Simple.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.006;
44

55
use strict;
66

7-
our $VERSION = '1.302062';
7+
our $VERSION = '1.302067';
88

99
use Test::Builder::Module;
1010
our @ISA = qw(Test::Builder::Module);

0 commit comments

Comments
 (0)