Skip to content

Commit

Permalink
Guard against test failures in future 0.5x releases
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Jul 29, 2015
1 parent 5c2c236 commit 2696750
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release history for Test-CPAN-Changes-ReallyStrict
[Bugfix]
- Ensure encoding of source and normalised lines are the same.
- Ensure attempting to load source file in the same manner as CPAN::Changes does w/rt UTF8
- Guard against test failure if 0.5x radically changes how things format by degrading currently affected tests to TODO

[Dependencies::Stats]
- Dependencies changed since 1.000001, see misc/*.deps* for details
Expand Down
9 changes: 9 additions & 0 deletions t/01_basic_mock.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ use strict;
use warnings;

use Test::More 0.96;
use CPAN::Changes;

local $TODO;
if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

use FindBin;
use lib "$FindBin::Bin/lib";
use mocktest;
Expand Down
9 changes: 9 additions & 0 deletions t/01_basic_mock_oo.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ use strict;
use warnings;

use Test::More 0.96;
use CPAN::Changes;

local $TODO;
if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

use FindBin;
use lib "$FindBin::Bin/lib";
use mocktest;
Expand Down
7 changes: 7 additions & 0 deletions t/03_keep_comparing_keeps_comparing.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ use strict;
use warnings;

use Test::More 0.96;
use CPAN::Changes;
local $TODO;
if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}
use FindBin;
use lib "$FindBin::Bin/lib";
use mocktest;
Expand Down
10 changes: 10 additions & 0 deletions t/03_keep_comparing_keeps_comparing_oo.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ use strict;
use warnings;

use Test::More 0.96;

use CPAN::Changes;

local $TODO;
if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

use FindBin;
use lib "$FindBin::Bin/lib";
use mocktest;
Expand Down
10 changes: 10 additions & 0 deletions t/04_next_token.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ use strict;
use warnings;

use Test::More 0.96;

use CPAN::Changes;

local $TODO;
if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

use FindBin;
use lib "$FindBin::Bin/lib";
use mocktest;
Expand Down
9 changes: 9 additions & 0 deletions t/04_next_token_oo.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ use strict;
use warnings;

use Test::More 0.96;
use CPAN::Changes;

local $TODO;
if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

use FindBin;
use lib "$FindBin::Bin/lib";
use mocktest;
Expand Down
11 changes: 11 additions & 0 deletions t/99_changes_strict.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
use Test::More;
use CPAN::Changes;

eval 'use Test::CPAN::Changes::ReallyStrict';
plan skip_all => 'Test::CPAN::Changes::ReallyStrict required for this test' if $@;

local $Test::CPAN::Changes::ReallyStrict::Object::TODO;

if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$Test::CPAN::Changes::ReallyStrict::Object::TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

$Text::Wrap::columns = 120;
$Text::Wrap::break = '(?![\x{00a0}\x{202f}])\s';
$Text::Wrap::huge = 'overflow';
Expand Down
12 changes: 12 additions & 0 deletions t/99_changes_strict_oo.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
use Test::More;
use CPAN::Changes;

eval 'use Test::CPAN::Changes::ReallyStrict::Object';

plan skip_all => 'Test::CPAN::Changes::ReallyStrict::Object required for this test' if $@;

local $Test::CPAN::Changes::ReallyStrict::Object::TODO;

if ( eval 'CPAN::Changes->VERSION(q[0.5]); 1' ) {
if ( not $ENV{AUTHOR_TESTING} ) {
$Test::CPAN::Changes::ReallyStrict::Object::TODO = "CPAN::Changes >= 0.5 is too new for this test";
}
}

require Text::Wrap;
$Text::Wrap::columns = 120;
$Text::Wrap::break = '(?![\x{00a0}\x{202f}])\s';
Expand Down

0 comments on commit 2696750

Please sign in to comment.