user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 2/4] t/common: move unix_server to t/httpd-corner.t
  2019-11-14  6:41  5% [PATCH 0/4] some minor test updates Eric Wong
@ 2019-11-14  6:41  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-11-14  6:41 UTC (permalink / raw)
  To: meta

unix_server() is not commonly used, only t/httpd-corner.t uses
it and most HTTP tests use TCP since most HTTP libraries only
support TCP.
---
 t/common.perl    | 10 ----------
 t/httpd-corner.t | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/t/common.perl b/t/common.perl
index 053a935a..d4a0fcd2 100644
--- a/t/common.perl
+++ b/t/common.perl
@@ -18,16 +18,6 @@ sub tcp_server () {
 	)
 }
 
-sub unix_server ($) {
-	my $s = IO::Socket::UNIX->new(
-		Listen => 1024,
-		Type => Socket::SOCK_STREAM(),
-		Local => $_[0],
-	);
-	$s->blocking(0);
-	$s;
-}
-
 sub tcp_connect {
 	my ($dest, %opt) = @_;
 	my $s = IO::Socket::INET->new(
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index 75573c3e..b063d9fa 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -51,6 +51,16 @@ if ($^O eq 'linux') {
 	setsockopt($sock, SOL_SOCKET, $var, $accf_arg) or die "setsockopt: $!";
 }
 
+sub unix_server ($) {
+	my $s = IO::Socket::UNIX->new(
+		Listen => 1024,
+		Type => Socket::SOCK_STREAM(),
+		Local => $_[0],
+	);
+	$s->blocking(0);
+	$s;
+}
+
 my $upath = "$tmpdir/s";
 my $unix = unix_server($upath);
 ok($unix, 'UNIX socket created');

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/4] some minor test updates
@ 2019-11-14  6:41  5% Eric Wong
  2019-11-14  6:41  7% ` [PATCH 2/4] t/common: move unix_server to t/httpd-corner.t Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-11-14  6:41 UTC (permalink / raw)
  To: meta

A few minor, low impact improvements to avoid loading
and running redundant code while I'm ironing out some
major test improvements.

Eric Wong (4):
  t/common: inline stream_to_string into t/feed.t
  t/common: move unix_server to t/httpd-corner.t
  t/psgi_mount: require SearchIdx before using
  doc: check-man: save the result of successful runs

 .gitignore               |  1 +
 Documentation/include.mk | 13 +++++++------
 t/common.perl            | 21 ---------------------
 t/feed.t                 |  9 ++++++++-
 t/httpd-corner.t         | 10 ++++++++++
 t/psgi_mount.t           |  3 ++-
 6 files changed, 28 insertions(+), 29 deletions(-)


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-11-14  6:41  5% [PATCH 0/4] some minor test updates Eric Wong
2019-11-14  6:41  7% ` [PATCH 2/4] t/common: move unix_server to t/httpd-corner.t Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).