diff options
author | Karen Etheridge <ether@cpan.org> | 2013-05-03 12:44:34 -0700 |
---|---|---|
committer | Karen Etheridge <ether@cpan.org> | 2013-06-21 21:26:09 -0700 |
commit | 70a520fa77671dd3ef1cdd51b21044b65a446d22 (patch) | |
tree | 2c7b96382df3c499eb9f0569379b2b6ad438bcc3 /t/02-conflicts.t | |
parent | da64122a3fb0c5c747fb88dfce9909285697cfc2 (diff) | |
download | dist-checkconflicts-70a520fa77671dd3ef1cdd51b21044b65a446d22.tar.gz dist-checkconflicts-70a520fa77671dd3ef1cdd51b21044b65a446d22.zip |
add tests to confirm there are no unexpected warnings either
Diffstat (limited to 't/02-conflicts.t')
-rw-r--r-- | t/02-conflicts.t | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/t/02-conflicts.t b/t/02-conflicts.t index f59777f..a97b387 100644 --- a/t/02-conflicts.t +++ b/t/02-conflicts.t @@ -1,9 +1,11 @@ #!/usr/bin/env perl use strict; use warnings; + use Test::More; use Test::Fatal; use Test::Warn; +use Test::Warnings; use lib 't/lib/02'; { @@ -88,11 +90,16 @@ use lib 't/lib/02'; "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" - ); + warning_like { + like( + exception { Foo::Conflicts::Broken->check_conflicts }, + qr/^Conflicts detected for Foo::Conflicts::Broken:\n Broken is version unknown, but must be greater than version 0.03\n/, + "correct conflict error", + ); + } + qr/Warning: Broken did not compile/, + 'Warning is also issued when Broken fails to compile', + ; } done_testing; |