File: 105_esc_slash.t

package info (click to toggle)
libcpanel-json-xs-perl 4.39-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: perl: 1,165; makefile: 8
file content (13 lines) | stat: -rw-r--r-- 231 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13

use Test::More tests => 2;
use strict;
use Cpanel::JSON::XS;
#########################

my $json = Cpanel::JSON::XS->new->allow_nonref;

my $js = '/';

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