From 24b5fa4102f9959b4be48abd3c7c007e30f0bd8a Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 21 Nov 2010 22:59:21 -0600 Subject: more tests --- t/04-merge.t | 21 +++++++++++++++++++++ t/lib/04/Foo/Conflicts.pm | 15 +++++++++++++++ t/lib/04/Foo/Conflicts2.pm | 12 ++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 t/04-merge.t create mode 100644 t/lib/04/Foo/Conflicts.pm create mode 100644 t/lib/04/Foo/Conflicts2.pm 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; -- cgit v1.2.3-54-g00ecf