File: 05Doc01basic.t

package info (click to toggle)
libpod-wsdl-perl 0.063-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 316 kB
  • sloc: perl: 1,808; xml: 44; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (4)
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
30
#!/usr/bin/perl -w
use Test::More tests => 7;
BEGIN {use_ok('Pod::WSDL::Doc')}
use strict;
use warnings;

eval {
	my $a1 = new Pod::WSDL::Doc();
};

ok(defined $@, 'new dies, if it does not get a string');

eval {
	my $a1 = new Pod::WSDL::Doc('blah blah ...');
};

ok(defined $@, 'new dies, if it does not get a string beginning with _DOC');

my $a1 = new Pod::WSDL::Doc('_DOC blah blah ...');

ok($a1->descr eq 'blah blah ...', 'Read descr correctly from input');

$a1 = new Pod::WSDL::Doc('   _DOC blah blah ...');
ok($a1->descr eq 'blah blah ...', 'Handles whitespace before _DOC correctly.');

$a1 = new Pod::WSDL::Doc('_DOC');
ok($a1->descr eq '', 'No description is handled correctly');

$a1->descr('more blah');
ok($a1->descr eq 'more blah', 'Setting description works');