When I try to print a JSON in a test name using the Test::BDD::Cucumber::Harness::Html i get the the character broken and the following error message:
Wide character in print at /home/dragos/perl5/perlbrew/perls/perl-5.26.3/lib/site_perl/5.26.3/Test2/Formatter/TAP.pm line 125
- The command I run is the following:
pherkin -oHtml mockserver > mockTest.html
- The code that is executed is following:
use Test2::V0;
Then
qr/test utf8 string/,
sub {
my $data = Mojo::File->new('test.json')->slurp();
$data = Encode::decode('utf8', $data);
is(1, 1, $data);
is $server->get(S->{'url'}),
'Hello stranger.', 'Welcome screen found';
};
- The JSON body is:
{
"address5": "DUMLUPINAR MAHALLESİ",
}
The result looks like this:
ok 1 - {
# "address5": "DUMLUPINAR MAHALLESİ",
# }
#