diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-04-14 11:19:12 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-14 13:04:10 +0200 |
commit | 675f5fb66fd30ff2ea0bfdf455430fe1f76e42a6 (patch) | |
tree | 3b5ff74eace00df8906edba62965d104555b96a4 /tests/serverhelp.pm | |
parent | 2522903b792ac5a802f780df60dc4647c58e2477 (diff) | |
download | curl-675f5fb66fd30ff2ea0bfdf455430fe1f76e42a6.tar.gz |
tests: support hex encoded data and mqtt server
The mqtt server is started using a "random" port.
Diffstat (limited to 'tests/serverhelp.pm')
-rw-r--r-- | tests/serverhelp.pm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/serverhelp.pm b/tests/serverhelp.pm index 4be207869..466091fcc 100644 --- a/tests/serverhelp.pm +++ b/tests/serverhelp.pm @@ -51,6 +51,7 @@ use vars qw( servername_str servername_canon server_pidfilename + server_portfilename server_logfilename server_cmdfilename server_inputfilename @@ -105,7 +106,7 @@ sub servername_str { $proto = uc($proto) if($proto); die "unsupported protocol: '$proto'" unless($proto && - ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS|DICT|SMB|SMBS|TELNET))$/)); + ($proto =~ /^(((FTP|HTTP|HTTP\/2|IMAP|POP3|SMTP|HTTP-PIPE)S?)|(TFTP|SFTP|SOCKS|SSH|RTSP|GOPHER|HTTPTLS|DICT|SMB|SMBS|TELNET|MQTT))$/)); $ipver = (not $ipver) ? 'ipv4' : lc($ipver); die "unsupported IP version: '$ipver'" unless($ipver && @@ -151,6 +152,15 @@ sub server_pidfilename { return '.'. servername_canon($proto, $ipver, $idnum) ."$trailer"; } +#*************************************************************************** +# Return file name for server port file. +# +sub server_portfilename { + my ($proto, $ipver, $idnum) = @_; + my $trailer = '_server.port'; + return '.'. servername_canon($proto, $ipver, $idnum) ."$trailer"; +} + #*************************************************************************** # Return file name for server log file. |