summaryrefslogtreecommitdiff
path: root/cpan/JSON-PP/t/105_esc_slash.t
blob: 56f415cf0208c1c262ed45c85424983a160930a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

use Test::More;
use strict;
use warnings;
BEGIN { plan tests => 2 };
BEGIN { $ENV{PERL_JSON_BACKEND} = 0; }
use JSON::PP;
#########################

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

my $js = '/';

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