libjson-tiny-perl/t/21-j-dies.t
2018-03-27 21:25:33 +02:00

10 lines
210 B
Perl

use strict;
use warnings;
use Test::More tests => 1;
use JSON::Tiny 'j';
eval { my $aref = j '[[]' };
like $@, qr/^Malformed JSON: Expected comma or right square/,
'j() dies on decode error; right error.';