File: 01-Webinject.t

package info (click to toggle)
libwebinject-perl 1.86-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 428 kB
  • ctags: 197
  • sloc: perl: 4,101; xml: 257; makefile: 7
file content (22 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env perl

##################################################

use strict;
use Test::More tests => 4;
use Data::Dumper;

use_ok('Webinject');

my $webinject = Webinject->new();
isa_ok($webinject, "Webinject", 'Object is a Webinject');

##################################################
# test some internal functions
my $teststring = '<äöüß>';
my $verify     = '%3C%C3%A4%C3%B6%C3%BC%C3%9F%3E';
is($webinject->_url_escape($teststring), $verify, '_url_escape() in scalar context');

my @test   = $webinject->_url_escape(qw'< ä ö ü ß >');
my @verify = qw'%3C %C3%A4 %C3%B6 %C3%BC %C3%9F %3E';
is_deeply(\@test, \@verify, '_url_escape() in list context');