Skip to content

Commit bc8732e

Browse files
committed
Add a test
1 parent 2313627 commit bc8732e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use strict;
2+
use warnings;
3+
use Test::More;
4+
5+
BEGIN { plan tests => 1 };
6+
7+
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
8+
9+
use JSON::PP;
10+
11+
my $ds = eval { JSON::PP::decode_json read_file() };
12+
ok !$@, "No error" or note $@;
13+
14+
sub read_file {
15+
my $json = <<"JSON";
16+
{
17+
"camel": "Amelia"
18+
}
19+
JSON
20+
wantarray ? split(/\R/, $json) : $json;
21+
}

0 commit comments

Comments
 (0)