[Commits] [SCM] clawsker branch, master, updated. 1.3.7-14-gb75f535
mones at claws-mail.org
mones at claws-mail.org
Wed Dec 20 18:44:51 UTC 2023
The branch, master has been updated
via b75f53594922d4d259f999dd01374db9a7fec5b9 (commit)
from 08bcc5b7936bd18e1e0ad8e655ccd0971a57d41c (commit)
Summary of changes:
t/log_message.t | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 t/log_message.t
- Log -----------------------------------------------------------------
commit b75f53594922d4d259f999dd01374db9a7fec5b9
Author: Ricardo Mones <ricardo at mones.org>
Date: Wed Dec 20 19:44:34 2023 +0100
Add test for log_message function
diff --git a/t/log_message.t b/t/log_message.t
new file mode 100644
index 0000000..7a77df9
--- /dev/null
+++ b/t/log_message.t
@@ -0,0 +1,27 @@
+use 5.010_000;
+use strict;
+use utf8;
+use Test::More tests => 6;
+use Test::Output;
+use Test::Exception;
+
+require_ok ('Clawsker');
+
+use Clawsker;
+
+stdout_is {
+ Clawsker::log_message('error') } '', 'no verbose';
+
+Clawsker::parse_command_line(['--verbose']);
+
+stdout_is {
+ Clawsker::log_message('error') } "clawsker: error\n", 'verbose';
+
+lives_ok {
+ Clawsker::log_message('error', 'ouch') } 'invalid fatal';
+
+stdout_is {
+ Clawsker::log_message('error', 'ouch') } "clawsker: error\n", 'message';
+
+dies_ok {
+ Clawsker::log_message('error', 'die') } 'ok fatal';
-----------------------------------------------------------------------
hooks/post-receive
--
Hidden preferences editor for Claws Mail
More information about the Commits
mailing list