File: pp.t

package info (click to toggle)
libjson-maybexs-perl 1.003008-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 152 kB
  • ctags: 7
  • sloc: perl: 95; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use strict;
use warnings;

# hide Cpanel::JSON::XS, JSON::XS
use lib map {
    my ( $m, $c ) = ( $_, qq{die "Can't locate $_ (hidden)\n"} );
    sub { return unless $_[1] eq $m; open my $fh, "<", \$c; return $fh }
} qw{Cpanel/JSON/XS.pm JSON/XS.pm};

use if !eval { require JSON::PP; 1; }, 'Test::More', skip_all => 'No JSON::PP';
use Test::More 0.88;
use JSON::MaybeXS;

diag 'Using JSON::PP ', JSON::PP->VERSION;

is(JSON, 'JSON::PP', 'Correct JSON class');

is(
  \&encode_json, \&JSON::PP::encode_json,
  'Correct encode_json function'
);

is(
  \&decode_json, \&JSON::PP::decode_json,
  'Correct encode_json function'
);

require 't/lib/is_bool.pm';

done_testing;