File: uris.t

package info (click to toggle)
librdf-ns-perl 20230619-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 392 kB
  • sloc: cpp: 3,225; perl: 483; sh: 6; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 525 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
23
24
25
use strict;
use warnings;
use Test::More;

BEGIN {
    eval {
        require RDF::NS::URIS;
        require URI;
        1;
    } or do {
        plan skip_all => "URI missing - skip tests of RDF::NS::URI";
    }
}

my $NS = RDF::NS::URIS->new('20120829');

my $foaf = 'http://xmlns.com/foaf/0.1/';
my $person = $foaf."Person";

is $NS->foaf,               URI->new($foaf);
is $NS->foaf_Person,        URI->new($person);
is $NS->URI('foaf:Person'), URI->new($person);
is $NS->foaf_Person->as_string, $person;

done_testing;