fix #10891: Change session->output->print to skip macros based on detecting the mime-type.
This commit is contained in:
parent
48be049930
commit
084da8e159
3 changed files with 13 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ use WebGUI::Session;
|
|||
|
||||
use Test::More; # increment this value for each test you create
|
||||
|
||||
my $skip_tests = 7;
|
||||
my $skip_tests = 8;
|
||||
my $num_tests = 1 + $skip_tests;
|
||||
|
||||
plan tests => $num_tests;
|
||||
|
|
@ -56,6 +56,11 @@ SKIP: {
|
|||
$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('');
|
||||
$output->setHandle($otherHandle);
|
||||
$output->print('New content');
|
||||
is($otherHandleBuffer, 'New content', 'print: set to explicit handle');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue