diff options
-rw-r--r-- | test/perl/syntax_error/psgi.pl | 5 | ||||
-rw-r--r-- | test/test_perl_application.py | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/perl/syntax_error/psgi.pl b/test/perl/syntax_error/psgi.pl new file mode 100644 index 00000000..2b6dbbea --- /dev/null +++ b/test/perl/syntax_error/psgi.pl @@ -0,0 +1,5 @@ +my $app = sub { + my ($environ) = @_ + + return ['200', [], []]; +}; diff --git a/test/test_perl_application.py b/test/test_perl_application.py index 3d42f829..884c6dfb 100644 --- a/test/test_perl_application.py +++ b/test/test_perl_application.py @@ -135,6 +135,16 @@ class TestUnitPerlApplication(unit.TestUnitApplicationPerl): self.assertEqual(self.get()['body'], 'body\n', 'body io file') + @unittest.expectedFailure + def test_perl_application_syntax_error(self): + self.skip_alerts.extend([ + r'PSGI: Failed to parse script', + r'process \d+ exited on signal' + ]) + self.load('syntax_error') + + self.assertEqual(self.get()['status'], 500, 'syntax error') + def test_perl_keepalive_body(self): self.load('variables') |