Remove SKIP
This commit is contained in:
parent
a07bf9b84f
commit
4cf75513d3
1 changed files with 22 additions and 26 deletions
|
|
@ -32,39 +32,35 @@ isa_ok($output, 'WebGUI::Session::Output', 'session has correct object type');
|
|||
|
||||
my $recentVersion = $^V gt v5.8;
|
||||
|
||||
SKIP: {
|
||||
skip "You have an old perl", $skip_tests unless $recentVersion;
|
||||
|
||||
my $otherHandleBuffer;
|
||||
open my $otherHandle, '>', \$otherHandleBuffer or die "Unable to create second filehandle: $!\n";
|
||||
my $otherHandleBuffer;
|
||||
open my $otherHandle, '>', \$otherHandleBuffer or die "Unable to create second filehandle: $!\n";
|
||||
|
||||
my $request = $session->request;
|
||||
my $request = $session->request;
|
||||
|
||||
$output->setHandle(undef);
|
||||
is($output->{_handle}, undef, 'setHandle: handle cleared');
|
||||
$output->setHandle(undef);
|
||||
is($output->{_handle}, undef, 'setHandle: handle cleared');
|
||||
|
||||
$output->print('Hello STDOUT');
|
||||
is($request->get_output, 'Hello STDOUT', 'print with no handle goes to STDOUT');
|
||||
$output->print('Hello STDOUT');
|
||||
is($request->get_output, 'Hello STDOUT', 'print with no handle goes to STDOUT');
|
||||
|
||||
$output->print(' more stuff');
|
||||
is($request->get_output, 'Hello STDOUT more stuff', 'print: tied variables accumulate');
|
||||
$output->print(' more stuff');
|
||||
is($request->get_output, 'Hello STDOUT more stuff', 'print: tied variables accumulate');
|
||||
|
||||
$session->user({userId => 3});
|
||||
$output->print('^#;');
|
||||
like($request->get_output, qr/3\Z/, 'print: macro processing');
|
||||
$session->user({userId => 3});
|
||||
$output->print('^#;');
|
||||
like($request->get_output, qr/3\Z/, 'print: macro processing');
|
||||
|
||||
$output->print('^#;', 1);
|
||||
like($request->get_output, qr/\^#;\Z/, 'print: macro processing skipped');
|
||||
$output->print('^#;', 1);
|
||||
like($request->get_output, qr/\^#;\Z/, 'print: macro processing skipped');
|
||||
|
||||
$session->http->setMimeType('application/json');
|
||||
$output->print('^#;');
|
||||
like($request->get_output, qr/\^#;\Z/, 'print: macro processing skipped');
|
||||
$session->http->setMimeType('application/json');
|
||||
$output->print('^#;');
|
||||
like($request->get_output, qr/\^#;\Z/, 'print: macro processing skipped');
|
||||
|
||||
$session->http->setMimeType('');
|
||||
$output->setHandle($otherHandle);
|
||||
$output->print('New content');
|
||||
is($otherHandleBuffer, 'New content', 'print: set to explicit handle');
|
||||
unlike($request->get_output, qr/New content\Z/, 'print: no leakage back to STDOUT');
|
||||
|
||||
}
|
||||
$session->http->setMimeType('');
|
||||
$output->setHandle($otherHandle);
|
||||
$output->print('New content');
|
||||
is($otherHandleBuffer, 'New content', 'print: set to explicit handle');
|
||||
unlike($request->get_output, qr/New content\Z/, 'print: no leakage back to STDOUT');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue