[SCM] libmessage-passing-perl Debian packaging branch, master, updated. debian/0.111-3-14-g44f6e88
Tomas Doran
bobtfish at bobtfish.net
Mon May 6 11:56:40 UTC 2013
The following commit has been merged in the master branch:
commit 17e696fbfca972099478517594235ee9f394a686
Author: Tomas Doran <bobtfish at bobtfish.net>
Date: Sat Mar 3 20:23:24 2012 +0000
Test the script options a bit
diff --git a/lib/Log/Stash.pm b/lib/Log/Stash.pm
index d757152..f4937c2 100644
--- a/lib/Log/Stash.pm
+++ b/lib/Log/Stash.pm
@@ -86,6 +86,7 @@ foreach my $name (map { lc($_) . "_options" } keys %things) {
handles => {
lc($name) => 'elements',
},
+ coerce => 1,
);
}
diff --git a/t/logstash_script.t b/t/logstash_script.t
new file mode 100644
index 0000000..6047c5a
--- /dev/null
+++ b/t/logstash_script.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use Test::More;
+
+use_ok 'Log::Stash';
+
+my $i = Log::Stash->new(
+ input => 'STDIN',
+ input_options => '{"foo":"bar"}',
+ filter_options => '{"baz":"quux"}',
+ output => 'STDOUT',
+ output_options => '{"x":"m"}',
+);
+
+is_deeply {$i->input_options}, {"foo" => "bar"};
+is_deeply {$i->filter_options}, {"baz" => "quux"};
+is_deeply {$i->output_options}, {"x" => "m"};
+
+done_testing;
+
--
libmessage-passing-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list