[Commits] [SCM] clawsker branch, master, updated. 1.3.2-17-gc4fce84

mones at claws-mail.org mones at claws-mail.org
Sat Feb 13 19:34:24 UTC 2021


The branch, master has been updated
       via  c4fce84e828e80b7294e43a9b65a0fd1963eb4d4 (commit)
      from  76ed7555c00bc01570552095df6d9ffe1ddab26c (commit)

Summary of changes:
 t/has_claws_socket.t | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 t/has_claws_socket.t


- Log -----------------------------------------------------------------
commit c4fce84e828e80b7294e43a9b65a0fd1963eb4d4
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Feb 13 20:34:12 2021 +0100

    Oops, add forgotten test

diff --git a/t/has_claws_socket.t b/t/has_claws_socket.t
new file mode 100644
index 0000000..9598de2
--- /dev/null
+++ b/t/has_claws_socket.t
@@ -0,0 +1,38 @@
+use 5.010_000;
+use strict;
+use utf8;
+use File::Temp qw(tempdir);
+use File::Spec::Functions;
+use Digest::MD5 qw(md5_hex);
+use Glib qw(TRUE FALSE);
+use IO::Socket::UNIX;
+use Test::More tests => 3;
+
+require_ok ('Clawsker');
+
+my ($dirok, $dirko);
+
+BEGIN {
+    my $tempdir = tempdir (CLEANUP => 1);
+    $dirok = catfile ($tempdir, 'ok');
+    mkdir $dirok;
+    $dirko = catfile ($tempdir, 'ko');
+    mkdir $dirko;
+    my $md5 = md5_hex ($ENV{HOME} . '/.claws-mail');
+    my $path = catfile ($dirok, $md5);
+    my $sock = IO::Socket::UNIX->new(
+        Type => SOCK_STREAM(), Local => $path, Listen => 1
+    );
+}
+
+use Clawsker;
+
+is (
+    Clawsker::has_claws_socket ($dirok), TRUE,
+    'ok has it'
+);
+
+is (
+    Clawsker::has_claws_socket ($dirko), FALSE,
+    'ko does not'
+);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Hidden preferences editor for Claws Mail


More information about the Commits mailing list