summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/JSON-PP/t/105_esc_slash.t
blob: 225186b88bd27c9c56cfe23f8571f84a8e7ccf66 (plain) (blame)
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} = 0; }
use JSON::PP;
#########################

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

my $js = '/';

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