diff options
author | Karen Etheridge <ether@cpan.org> | 2012-03-02 21:57:54 +0000 |
---|---|---|
committer | Karen Etheridge <ether@cpan.org> | 2013-06-21 21:25:08 -0700 |
commit | da64122a3fb0c5c747fb88dfce9909285697cfc2 (patch) | |
tree | aa7230be847eb789eef134c2889ed4fd93bcef00 /t/02-conflicts.t | |
parent | 8383bd1012327feb3823ac62222155d4f73cc6ce (diff) | |
download | dist-checkconflicts-da64122a3fb0c5c747fb88dfce9909285697cfc2.tar.gz dist-checkconflicts-da64122a3fb0c5c747fb88dfce9909285697cfc2.zip |
fix for RT#75486: instead of silently ignoring conflicts that do not compile, issue a conflict warning
Diffstat (limited to 't/02-conflicts.t')
-rw-r--r-- | t/02-conflicts.t | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/02-conflicts.t b/t/02-conflicts.t index 3d288a2..f59777f 100644 --- a/t/02-conflicts.t +++ b/t/02-conflicts.t @@ -3,6 +3,7 @@ use strict; use warnings; use Test::More; use Test::Fatal; +use Test::Warn; use lib 't/lib/02'; { @@ -69,4 +70,29 @@ use lib 't/lib/02'; ); } +{ + # conflicting module is utterly broken + + use_ok('Foo::Conflicts::Broken'); + + my @conflicts; + warning_like { @conflicts = Foo::Conflicts::Broken->calculate_conflicts } + qr/Warning: Broken did not compile/, + 'Warning is issued when Broken fails to compile'; + + is_deeply( + \@conflicts, + [ + { package => 'Broken', installed => 'unknown', required => '0.03' }, + ], + "correct versions for all conflicts", + ); + + is( + exception { Foo::Conflicts::Broken->check_conflicts }, + "Conflicts detected for Foo::Conflicts::Broken:\n Broken is version unknown, but must be greater than version 0.03\n", + "correct conflict error" + ); +} + done_testing; |