This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libcatmandu-perl.

commit bffeddf46213b618145cffdd61b0745ca55c956c
Author: Patrick Hochstenbach <patrick.hochstenb...@ugent.be>
Date:   Fri Dec 11 11:39:37 2015 +0100

    Adding more testing
---
 t/Catmandu-CLI.t | 40 ++++++++++++++++++++++++++++++++++++++++
 t/log4perl.conf  | 16 ++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/t/Catmandu-CLI.t b/t/Catmandu-CLI.t
index 285d919..692f1ec 100644
--- a/t/Catmandu-CLI.t
+++ b/t/Catmandu-CLI.t
@@ -74,4 +74,44 @@ if ($^O ne 'MSWin32') { # /dev/null required
     like $result->stderr , qr/Catmandu::Exporter::Testing123/ , 'wrong 
exporter error';
 }
 
+{
+    my $result = test_app(qq|Catmandu::CLI| => [ qw(-D convert Null to Null)]);
+    like $result->stderr , qr/debug activated/ , 'debug activated';
+}
+
+{
+    Catmandu->config->{log4perl} = <<EOF;
+log4perl.category.Catmandu=DEBUG,STDERR
+log4perl.categoty.Catmandu::Fix::log=TRACE,STDERR
+
+log4perl.appender.STDOUT=Log::Log4perl::Appender::Screen
+log4perl.appender.STDOUT.stderr=0
+log4perl.appender.STDOUT.utf8=1
+
+log4perl.appender.STDOUT.layout=PatternLayout
+log4perl.appender.STDOUT.layout.ConversionPattern=%d [%P] - %p %l %M time=%r : 
%m%n
+
+log4perl.appender.STDERR=Log::Log4perl::Appender::Screen
+log4perl.appender.STDERR.stderr=1
+log4perl.appender.STDERR.utf8=1
+
+log4perl.appender.STDERR.layout=PatternLayout
+log4perl.appender.STDERR.layout.ConversionPattern=%d [%P] - %l : %m%n
+EOF
+    my $result = test_app(qq|Catmandu::CLI| => [ qw(-D convert Null to Null)]);
+    like $result->stderr , qr/defined in catmandu\.yml/ , 'debug activated via 
catmandu.yml';
+}
+
+{
+    Catmandu->config->{log4perl} = 't/log4perl.conf';
+    my $result = test_app(qq|Catmandu::CLI| => [ qw(-D convert Null to Null)]);
+    like $result->stderr , qr/file: t\/log4perl\.conf/ , 'debug activated via 
t/log4perl.conf';
+}
+
+{
+    my $result = test_app(qq|Catmandu::CLI| => [ qw(convert JSON --file 
http://google.com/nonononono to Null)]);
+    like $result->stderr , qr/Oops! Got a HTTP error/ , 'Got an HTTP error';
+}
+
+
 done_testing;
diff --git a/t/log4perl.conf b/t/log4perl.conf
new file mode 100644
index 0000000..c5b8dec
--- /dev/null
+++ b/t/log4perl.conf
@@ -0,0 +1,16 @@
+log4perl.category.Catmandu=DEBUG,STDERR
+log4perl.categoty.Catmandu::Fix::log=TRACE,STDERR
+
+log4perl.appender.STDOUT=Log::Log4perl::Appender::Screen
+log4perl.appender.STDOUT.stderr=0
+log4perl.appender.STDOUT.utf8=1
+
+log4perl.appender.STDOUT.layout=PatternLayout
+log4perl.appender.STDOUT.layout.ConversionPattern=%d [%P] - %p %l %M time=%r : 
%m%n
+
+log4perl.appender.STDERR=Log::Log4perl::Appender::Screen
+log4perl.appender.STDERR.stderr=1
+log4perl.appender.STDERR.utf8=1
+
+log4perl.appender.STDERR.layout=PatternLayout
+log4perl.appender.STDERR.layout.ConversionPattern=%d [%P] - %l : %m%n
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libcatmandu-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to