diff options
-rw-r--r-- | t/05-also.t | 32 | ||||
-rw-r--r-- | t/lib/05/Bar/Conflicts.pm | 13 | ||||
-rw-r--r-- | t/lib/05/Bar/Conflicts2.pm | 13 | ||||
-rw-r--r-- | t/lib/05/Foo.pm | 5 | ||||
-rw-r--r-- | t/lib/05/Foo/Conflicts.pm | 11 |
5 files changed, 74 insertions, 0 deletions
diff --git a/t/05-also.t b/t/05-also.t new file mode 100644 index 0000000..286f8fa --- /dev/null +++ b/t/05-also.t @@ -0,0 +1,32 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; +use Test::Fatal; +use lib 't/lib/05'; + +{ + use_ok('Bar::Conflicts'); + is_deeply( + { Bar::Conflicts->conflicts }, + { + 'Bar::Local' => '0.02', + 'Foo::Thing' => '0.01', + 'Foo::Thing::Sub' => '0.05', + }, + "can detect the proper conflicts module" + ); +} + +{ + use_ok('Bar::Conflicts2'); + is_deeply( + { Bar::Conflicts2->conflicts }, + { + 'Bar::Also' => '0.06', + }, + "unknown also entries are ignored" + ); +} + +done_testing; diff --git a/t/lib/05/Bar/Conflicts.pm b/t/lib/05/Bar/Conflicts.pm new file mode 100644 index 0000000..ffeb56a --- /dev/null +++ b/t/lib/05/Bar/Conflicts.pm @@ -0,0 +1,13 @@ +package Bar::Conflicts; +use strict; +use warnings; + +use Dist::CheckConflicts + -conflicts => { + 'Bar::Local' => 0.02, + }, + -also => [ + 'Foo', + ]; + +1; diff --git a/t/lib/05/Bar/Conflicts2.pm b/t/lib/05/Bar/Conflicts2.pm new file mode 100644 index 0000000..d45754e --- /dev/null +++ b/t/lib/05/Bar/Conflicts2.pm @@ -0,0 +1,13 @@ +package Bar::Conflicts2; +use strict; +use warnings; + +use Dist::CheckConflicts + -conflicts => { + 'Bar::Also' => 0.06, + }, + -also => [ + 'Baz', + ]; + +1; diff --git a/t/lib/05/Foo.pm b/t/lib/05/Foo.pm new file mode 100644 index 0000000..8c4dc16 --- /dev/null +++ b/t/lib/05/Foo.pm @@ -0,0 +1,5 @@ +package Foo; + +sub foo { } + +1; diff --git a/t/lib/05/Foo/Conflicts.pm b/t/lib/05/Foo/Conflicts.pm new file mode 100644 index 0000000..0d9d7ef --- /dev/null +++ b/t/lib/05/Foo/Conflicts.pm @@ -0,0 +1,11 @@ +package Foo::Conflicts; +use strict; +use warnings; + +use Dist::CheckConflicts + -conflicts => { + 'Foo::Thing' => 0.01, + 'Foo::Thing::Sub' => 0.05, + }; + +1; |