File: 50dom-meta.t

package info (click to toggle)
libparse-man-perl 0.03-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: perl: 1,426; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 541 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl

use v5.14;
use warnings;

use Test::More;

use Parse::Man::DOM;

my $parser = Parse::Man::DOM->new;

my $document = $parser->from_string( <<'EOMAN' );
.TH TITLE 3
EOMAN

isa_ok( $document, "Parse::Man::DOM::Document", '$document' );

isa_ok( $document->meta( "name" ), "Parse::Man::DOM::Metadata", '$document->meta( "name" )' );

is( $document->meta( "name" )->value,    "TITLE", '$document->meta( "name" )->value' );
is( $document->meta( "section" )->value, 3,       '$document->meta( "section" )->value' );

done_testing;