Tests: more perl tests.

This commit is contained in:
Andrey Zelenkov
2018-02-26 19:53:40 +03:00
parent 6d79c559b5
commit a89747e97c
4 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
my $app = sub {
my ($environ) = @_;
return ['200', [
'Content-Length' => 0,
'Set-Cookie' => 'tc=one,two,three',
'Set-Cookie' => 'tc=four,five,six'
], []];
};

View File

@@ -0,0 +1,10 @@
my $app = sub {
my ($environ) = @_;
$len_1 = $environ->{'psgi.input'}->read(my $body_1, 4);
$len_2 = $environ->{'psgi.input'}->read(my $body_2, 4);
$len_3 = $environ->{'psgi.input'}->read(my $body_3, 2);
return ['200', ['Content-Length' => $len_1 + $len_2 + $len_3],
[$body_1 . $body_2 . $body_3]];
};