libjson-tiny-perl/t/21-j-dies.t

10 lines
210 B
Perl
Raw Normal View History

2018-03-27 21:25:33 +02:00
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.';