about summary refs log tree commit homepage
path: root/t/httpd-unix.t
diff options
context:
space:
mode:
Diffstat (limited to 't/httpd-unix.t')
-rw-r--r--t/httpd-unix.t8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/httpd-unix.t b/t/httpd-unix.t
index b3368491..13df676b 100644
--- a/t/httpd-unix.t
+++ b/t/httpd-unix.t
@@ -35,6 +35,14 @@ my $spawn_httpd = sub {
         ok(defined $pid, 'forked httpd process successfully');
 };
 
+{
+        require PublicInbox::Daemon;
+        my $l = "$tmpdir/named.sock";
+        my $s = IO::Socket::UNIX->new(Listen => 5, Local => $l,
+                                        Type => SOCK_STREAM);
+        is(PublicInbox::Daemon::sockname($s), $l, 'sockname works for UNIX');
+}
+
 ok(!-S $unix, 'UNIX socket does not exist, yet');
 $spawn_httpd->("-l$unix");
 for (1..1000) {