Add wide character JSON encoding test.
This commit is contained in:
parent
935054dd82
commit
f41421058c
1 changed files with 11 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ use FindBin;
|
||||||
use lib "$FindBin::Bin/../../../lib";
|
use lib "$FindBin::Bin/../../../lib";
|
||||||
use Test::More;
|
use Test::More;
|
||||||
use Test::Deep;
|
use Test::Deep;
|
||||||
|
use Test::Exception;
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use WebGUI::Test; # Must use this before any other WebGUI modules
|
use WebGUI::Test; # Must use this before any other WebGUI modules
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
|
|
@ -20,7 +21,7 @@ my $session = WebGUI::Test->session;
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Tests
|
# Tests
|
||||||
my $tests = 33;
|
my $tests = 34;
|
||||||
plan tests => $tests + 1 + 3;
|
plan tests => $tests + 1 + 3;
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
@ -194,6 +195,15 @@ cmp_deeply(
|
||||||
'new: Always creates 1 section, if none is provided in the initial JSON string',
|
'new: Always creates 1 section, if none is provided in the initial JSON string',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
lives_ok
|
||||||
|
{
|
||||||
|
my $foo = WebGUI::Asset::Wobject::Survey::SurveyJSON->new(
|
||||||
|
qq!{ "survey" : "on 16\x{201d} hand-crocheted Cord" }!,
|
||||||
|
$session->log
|
||||||
|
);
|
||||||
|
}
|
||||||
|
'new handles wide characters';
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
#
|
#
|
||||||
# freeze
|
# freeze
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue