summaryrefslogtreecommitdiff
path: root/t/e05_esc_slash.t
blob: 9be12cfc4114b04c17b4def236d2504c1a7544f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

use Test::More;
use strict;
BEGIN { plan tests => 2 };
BEGIN { $ENV{PERL_JSON_BACKEND} = "JSON::backportPP"; }
use JSON;
#########################

my $json = JSON->new->allow_nonref;

my $js = '/';

is($json->encode($js), '"/"');
is($json->escape_slash->encode($js), '"\/"');