File: 06-nonstr.t

package info (click to toggle)
liburi-escape-xs-perl 0.12-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 144 kB
  • ctags: 3
  • sloc: perl: 239; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!perl -w
#
# $Id: 06-nonstr.t,v 0.1 2014/04/16 10:48:20 dankogai Exp $
#
# https://rt.cpan.org/Ticket/Display.html?id=45855

use URI::Escape::XS;
use Test::More tests => 4;

my $d = 42;
is encodeURIComponent($d) => '42', "encodeURIComponent($d)";
is decodeURIComponent($d) => '42', "decodeURIComponent($d)";
my $rd = \$d;
my $rx = qr/^SCALAR\(0x[0-9a-fA-F]+\)$/ms;
like encodeURIComponent($rd) => $rx, "encodeURIComponent($rd)";
like decodeURIComponent($rd) => $rx, "decodeURIComponent($rd)";