summaryrefslogtreecommitdiff
path: root/cpan/Version-Requirements/t/from-hash.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/Version-Requirements/t/from-hash.t')
-rw-r--r--cpan/Version-Requirements/t/from-hash.t48
1 files changed, 0 insertions, 48 deletions
diff --git a/cpan/Version-Requirements/t/from-hash.t b/cpan/Version-Requirements/t/from-hash.t
deleted file mode 100644
index 5c2bca3f76..0000000000
--- a/cpan/Version-Requirements/t/from-hash.t
+++ /dev/null
@@ -1,48 +0,0 @@
-use strict;
-use warnings;
-
-use Version::Requirements;
-
-use Test::More 0.88;
-
-sub dies_ok (&@) {
- my ($code, $qr, $comment) = @_;
-
- my $lived = eval { $code->(); 1 };
-
- if ($lived) {
- fail("$comment: did not die");
- } else {
- like($@, $qr, $comment);
- }
-}
-
-{
- my $string_hash = {
- Left => 10,
- Shared => '>= 2, <= 9, != 7',
- Right => 18,
- };
-
- my $req = Version::Requirements->from_string_hash($string_hash);
-
- is_deeply(
- $req->as_string_hash,
- $string_hash,
- "we can load from a string hash",
- );
-}
-
-{
- my $string_hash = {
- Left => 10,
- Shared => '= 2',
- Right => 18,
- };
-
- dies_ok { Version::Requirements->from_string_hash($string_hash) }
- qr/illegal/,
- "we die when we can't understand a version spec";
-}
-
-done_testing;