File: history.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 (30 lines) | stat: -rw-r--r-- 701 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
26
27
28
29
30
use strict;
use warnings;
use Test::More;

use RDF::NS;

my %counts = ( # excluding prefix 'uri'
    20111028 => 698,
    20111031 => 700,
    20111102 => 701,
    20111124 => 709,
    20111208 => 716,
    20120124 => 733,
    20120426 => 780,
    20120521 => 791,
    20120827 => 830,
);

while ( my ($date,$number) = each(%counts) ) {
    my $ns = RDF::NS->new($date);
    is $ns->COUNT, $number, "$number prefixes at $date";
}

my $nfo1 = RDF::NS->new(20120125)->nfo;
my $nfo2 = RDF::NS->new(at => '2012-04-27')->nfo;

is $nfo1, 'http://www.semanticdesktop.org/ontologies/nfo/#', 'old prefix';
is $nfo2, 'http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#', 'prefix changed';

done_testing;