summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-11-21 22:59:21 -0600
committerJesse Luehrs <doy@tozt.net>2010-11-21 22:59:21 -0600
commit24b5fa4102f9959b4be48abd3c7c007e30f0bd8a (patch)
tree759be52557bdaf7bb08dab11b14cf287cbd649b2
parent9e1c45cd07ca60274032080ebbbf2d6bdf114a41 (diff)
downloaddist-checkconflicts-24b5fa4102f9959b4be48abd3c7c007e30f0bd8a.tar.gz
dist-checkconflicts-24b5fa4102f9959b4be48abd3c7c007e30f0bd8a.zip
more tests
-rw-r--r--t/04-merge.t21
-rw-r--r--t/lib/04/Foo/Conflicts.pm15
-rw-r--r--t/lib/04/Foo/Conflicts2.pm12
3 files changed, 48 insertions, 0 deletions
diff --git a/t/04-merge.t b/t/04-merge.t
new file mode 100644
index 0000000..9c0f3b6
--- /dev/null
+++ b/t/04-merge.t
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/lib/04';
+
+{
+ use_ok('Foo::Conflicts');
+ is_deeply(
+ { Foo::Conflicts->conflicts },
+ {
+ 'Foo::One' => '0.03',
+ 'Foo::Two' => '0.03',
+ 'Foo::Three' => '0.02',
+ 'Foo::Four' => '0.02',
+ },
+ "got the right conflicts"
+ );
+}
+
+done_testing;
diff --git a/t/lib/04/Foo/Conflicts.pm b/t/lib/04/Foo/Conflicts.pm
new file mode 100644
index 0000000..3691702
--- /dev/null
+++ b/t/lib/04/Foo/Conflicts.pm
@@ -0,0 +1,15 @@
+package Foo::Conflicts;
+use strict;
+use warnings;
+
+use Dist::CheckConflicts
+ -conflicts => {
+ 'Foo::One' => 0.01,
+ 'Foo::Two' => 0.03,
+ 'Foo::Three' => 0.02,
+ },
+ -also => [
+ 'Foo::Conflicts2',
+ ];
+
+1;
diff --git a/t/lib/04/Foo/Conflicts2.pm b/t/lib/04/Foo/Conflicts2.pm
new file mode 100644
index 0000000..b782a2b
--- /dev/null
+++ b/t/lib/04/Foo/Conflicts2.pm
@@ -0,0 +1,12 @@
+package Foo::Conflicts2;
+use strict;
+use warnings;
+
+use Dist::CheckConflicts
+ -conflicts => {
+ 'Foo::One' => 0.03,
+ 'Foo::Two' => 0.01,
+ 'Foo::Four' => 0.02,
+ };
+
+1;