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/001_header.t | |
parent | Merging upstream version 1.9.4. (diff) | |
download | dnsdist-c96f16e8103783f6b98d9f844ea3a7f2195e4834.tar.xz dnsdist-c96f16e8103783f6b98d9f844ea3a7f2195e4834.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/001_header.t')
-rw-r--r-- | debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/001_header.t | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/001_header.t b/debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/001_header.t deleted file mode 100644 index 8e1476b..0000000 --- a/debian/vendor-h2o/misc/p5-net-fastcgi/t/020_protocol/001_header.t +++ /dev/null @@ -1,51 +0,0 @@ -#!perl - -use strict; -use warnings; - -use lib 't/lib', 'lib'; -use myconfig; - -use Test::More tests => 13; -use Test::HexString; -use Test::Exception; - -BEGIN { - use_ok('Net::FastCGI::Protocol', qw[ build_header - parse_header ]); -} - -my @tests = ( - # octets type request_id content_length padding_length - ["\x01\x00\x00\x00\x00\x00\x00\x00", 0, 0, 0, 0 ], - ["\x01\xFF\xFF\xFF\xFF\xFF\xFF\x00", 0xFF, 0xFFFF, 0xFFFF, 0xFF ], -); - -foreach my $test (@tests) { - my $expected = $test->[0]; - my $got = build_header(@$test[1..4]); - is_hexstr($got, $expected, 'build_header()'); -} - -foreach my $test (@tests) { - my @expected = @$test[1..4]; - my @got = parse_header($test->[0]); - is_deeply(\@got, \@expected, "parse_header() in list context"); -} - -my @components = qw(type request_id content_length padding_length); -foreach my $test (@tests) { - my $expected; @$expected{@components} = @$test[1..4]; - my $got = parse_header($test->[0]); - is_deeply($got, $expected, "parse_header() in scalar context"); -} - - -throws_ok { parse_header("") } qr/FastCGI: Insufficient .* FCGI_Header/; -throws_ok { parse_header(undef) } qr/FastCGI: Insufficient .* FCGI_Header/; -throws_ok { parse_header("\x00\x00\x00\x00\x00\x00\x00\x00") } qr/^FastCGI: Protocol version mismatch/; -throws_ok { parse_header("\xFF\x00\x00\x00\x00\x00\x00\x00") } qr/^FastCGI: Protocol version mismatch/; - -throws_ok { build_header() } qr/^Usage: /; -throws_ok { parse_header() } qr/^Usage: /; - |