[SCM] libmoox-options-perl Debian packaging branch, master, updated. debian/3.78-1-17-g6aa50a6
celogeek
me at celogeek.com
Mon May 6 12:22:38 UTC 2013
The following commit has been merged in the master branch:
commit 94d4c595f61c168636ccacc2e191bbb5ba4e2102
Author: celogeek <me at celogeek.com>
Date: Thu Apr 25 00:09:08 2013 +0200
test json support
diff --git a/t/base.st b/t/base.st
index f88e5c7..3e8ddd6 100644
--- a/t/base.st
+++ b/t/base.st
@@ -211,4 +211,13 @@ subtest "test dash" => sub {
}
};
+subtest "json" => sub {
+ note "json";
+ {
+ local @ARGV = ("--t", "{\"a\":1,\"b\":2}");
+ my $t = t_json->new_with_options();
+ is_deeply($t->t, {a => 1, b => 2}, 'json properly set');
+ }
+};
+
1;
diff --git a/t/mo.t b/t/mo.t
index 8421aef..592fe64 100644
--- a/t/mo.t
+++ b/t/mo.t
@@ -213,9 +213,30 @@ BEGIN {
1;
}
+{
+ package t_jsonRole;
+ use Moo::Role;
+ use Mo;
+ use MooX::Options;
+
+ option 't' => ( is => 'ro', json => 1 );
+ 1;
+
+}
+
+{
+
+ package t_json;
+ use Mo;
+ use Role::Tiny::With;
+ with 't_jsonRole';
+ 1;
+}
+
subtest "Mo" => sub {
note "Test Mo";
require $RealBin . '/base.st';
};
+
done_testing;
diff --git a/t/moo.t b/t/moo.t
index b7062f8..efe1c95 100644
--- a/t/moo.t
+++ b/t/moo.t
@@ -114,6 +114,16 @@ use Try::Tiny;
1;
}
+{
+
+ package t_json;
+ use Moo;
+ use MooX::Options;
+
+ option 't' => ( is => 'ro', json => 1 );
+ 1;
+}
+
subtest "Moo" => sub {
note "Test Moo";
require $RealBin . '/base.st';
diff --git a/t/moose.t b/t/moose.t
index a90abac..4ea1da1 100644
--- a/t/moose.t
+++ b/t/moose.t
@@ -121,6 +121,16 @@ BEGIN {
1;
}
+{
+
+ package t_json;
+ use Moose;
+ use MooX::Options;
+
+ option 't' => ( is => 'ro', json => 1 );
+ 1;
+}
+
subtest "Moose" => sub {
note "Test Moose";
require $RealBin . '/base.st';
--
libmoox-options-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list