File: 03badbytes.t

package info (click to toggle)
libhttp-oai-perl 4.03-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 416 kB
  • ctags: 326
  • sloc: perl: 2,531; xml: 224; makefile: 12
file content (29 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use Test::More tests => 3;

use strict;
use warnings;

use HTTP::OAI;

my $ha = HTTP::OAI::Harvester->new( baseURL => 'file:///' );

ok(defined $ha);

my $r = "HTTP::OAI::GetRecord"->new(
	harvestAgent => $ha,
	resume => $ha->resume,
);

$HTTP::OAI::UserAgent::SILENT_BAD_CHARS = 1;

$r = $ha->request(
	HTTP::Request->new( GET => 'file:examples/badbytes.xml' ),
	undef, # arg
	undef, # size
	undef, # previous
	$r
);

ok($r->is_success);

ok(1);