Tests: added Perl test with many responses using streaming body.
This commit is contained in:
11
test/perl/streaming_body_multiple_responses/psgi.pl
Normal file
11
test/perl/streaming_body_multiple_responses/psgi.pl
Normal file
@@ -0,0 +1,11 @@
|
||||
my $counter = 2;
|
||||
|
||||
my $app = sub {
|
||||
my $env = shift;
|
||||
|
||||
return sub {
|
||||
my $responder = shift;
|
||||
$responder->([200, ['Content-Type'=>'text/plain'], [$counter++]]);
|
||||
$responder->([200, ['Content-Type'=>'text/plain'], [$counter++]]);
|
||||
};
|
||||
};
|
||||
@@ -179,6 +179,11 @@ class TestPerlApplication(TestApplicationPerl):
|
||||
|
||||
assert self.get()['body'] == 'body\n', 'body io file'
|
||||
|
||||
def test_perl_streaming_body_multiple_responses(self):
|
||||
self.load('streaming_body_multiple_responses')
|
||||
|
||||
assert self.get()['status'] == 200
|
||||
|
||||
@pytest.mark.skip('not yet')
|
||||
def test_perl_application_syntax_error(self, skip_alert):
|
||||
skip_alert(r'PSGI: Failed to parse script')
|
||||
|
||||
Reference in New Issue
Block a user