make Self module parse old and new graphml
[scpubgit/stemmatology.git] / t / text_tradition_parser_self.t
1 #!/usr/bin/perl -w
2
3 use strict;
4 use Test::More 'no_plan';
5 $| = 1;
6
7
8
9 # =begin testing
10 {
11 use Text::Tradition;
12 binmode STDOUT, ":utf8";
13 binmode STDERR, ":utf8";
14 eval { no warnings; binmode $DB::OUT, ":utf8"; };
15
16 my $tradition = 't/data/florilegium_graphml.xml';
17 my $t = Text::Tradition->new( 
18     'name'  => 'inline', 
19     'input' => 'Self',
20     'file'  => $tradition,
21     );
22
23 is( ref( $t ), 'Text::Tradition', "Parsed our own GraphML" );
24 if( $t ) {
25     is( scalar $t->collation->readings, 319, "Collation has all readings" );
26     is( scalar $t->collation->paths, 376, "Collation has all paths" );
27     is( scalar $t->witnesses, 13, "Collation has all witnesses" );
28 }
29 }
30
31
32
33
34 1;