diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:49:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 02:49:40 +0000 |
commit | c96f16e8103783f6b98d9f844ea3a7f2195e4834 (patch) | |
tree | 479bef5e7eb5d4f04ba171931c8b47335734e161 /debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/070_names.t | |
parent | Merging upstream version 1.9.4. (diff) | |
download | dnsdist-debian/1.9.4-1.tar.xz dnsdist-debian/1.9.4-1.zip |
Adding debian version 1.9.4-1.debian/1.9.4-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/070_names.t')
-rw-r--r-- | debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/070_names.t | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/070_names.t b/debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/070_names.t deleted file mode 100644 index 86af502..0000000 --- a/debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/070_names.t +++ /dev/null @@ -1,80 +0,0 @@ -#!perl - -use strict; -use warnings; - -use lib 't/lib', 'lib'; -use myconfig; - -use Test::More tests => 29; -use Test::Exception; - -BEGIN { - use_ok('Net::FastCGI::Constant', qw[ :type :role :protocol_status ] ); - use_ok('Net::FastCGI::Protocol', qw[ get_type_name - get_role_name - get_protocol_status_name ] ); -} - -{ - my @tests = ( - [ FCGI_BEGIN_REQUEST, 'FCGI_BEGIN_REQUEST' ], - [ FCGI_ABORT_REQUEST, 'FCGI_ABORT_REQUEST' ], - [ FCGI_END_REQUEST, 'FCGI_END_REQUEST' ], - [ FCGI_PARAMS, 'FCGI_PARAMS' ], - [ FCGI_STDIN, 'FCGI_STDIN' ], - [ FCGI_STDOUT, 'FCGI_STDOUT' ], - [ FCGI_STDERR, 'FCGI_STDERR' ], - [ FCGI_DATA, 'FCGI_DATA' ], - [ FCGI_GET_VALUES, 'FCGI_GET_VALUES' ], - [ FCGI_GET_VALUES_RESULT, 'FCGI_GET_VALUES_RESULT' ], - [ FCGI_UNKNOWN_TYPE, 'FCGI_UNKNOWN_TYPE' ], - ); - - foreach my $test ( @tests ) { - my ( $type, $name ) = @$test; - is( get_type_name($type), $name, qq/get_type_name($type) = $name/ ); - } - - foreach my $type ( 0, 0xFF ) { - is(get_type_name($type), sprintf('0x%.2X', $type)); - } -} - -{ - my @tests = ( - [ FCGI_RESPONDER, 'FCGI_RESPONDER' ], - [ FCGI_AUTHORIZER, 'FCGI_AUTHORIZER' ], - [ FCGI_FILTER, 'FCGI_FILTER' ], - ); - - foreach my $test ( @tests ) { - my ( $role, $name ) = @$test; - is( get_role_name($role), $name, qq/get_role_name($role) = $name/ ); - } - - foreach my $role ( 0, 0xFF, 0xFFFF ) { - is(get_role_name($role), sprintf('0x%.4X', $role)); - } -} - -{ - my @tests = ( - [ FCGI_REQUEST_COMPLETE, 'FCGI_REQUEST_COMPLETE' ], - [ FCGI_CANT_MPX_CONN, 'FCGI_CANT_MPX_CONN' ], - [ FCGI_OVERLOADED, 'FCGI_OVERLOADED' ], - [ FCGI_UNKNOWN_ROLE, 'FCGI_UNKNOWN_ROLE' ], - ); - - foreach my $test ( @tests ) { - my ( $status, $name ) = @$test; - is( get_protocol_status_name($status), $name, qq/get_protocol_status_name($status) = $name/ ); - } - - is(get_protocol_status_name(0xFF), '0xFF'); -} - -throws_ok { get_type_name() } qr/^Usage: /; -throws_ok { get_role_name() } qr/^Usage: /; -throws_ok { get_protocol_status_name() } qr/^Usage: /; - |