X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftext_tradition_parser_self.t;h=0a1ec1011b3ad195c3b7e1220863e99c75c342bf;hb=fc5c4949b38572067ab389afa8c1cafec2b5dbd0;hp=612cf1efe8b5463af4abd9bea2ea44aa76ee5945;hpb=bbd064a9a0899c1ca82b094ecd81a11b312a3ed9;p=scpubgit%2Fstemmatology.git diff --git a/t/text_tradition_parser_self.t b/t/text_tradition_parser_self.t index 612cf1e..0a1ec10 100644 --- a/t/text_tradition_parser_self.t +++ b/t/text_tradition_parser_self.t @@ -27,9 +27,10 @@ if( $t ) { is( scalar $t->witnesses, 13, "Collation has all witnesses" ); } -# TODO add a relationship, write graphml, reparse it, check that the rel -# is still there +# TODO add a relationship, add a stemma, write graphml, reparse it, check that +# the new data is there $t->language('Greek'); +$t->add_stemma( 'dotfile' => 't/data/florilegium.dot' ); $t->collation->add_relationship( 'w12', 'w13', { 'type' => 'grammatical', 'scope' => 'global', 'annotation' => 'This is some note' } ); @@ -47,6 +48,8 @@ if( $newt ) { my $rel = $newt->collation->get_relationship( 'w12', 'w13' ); ok( $rel, "Found set relationship" ); is( $rel->annotation, 'This is some note', "Relationship has its properties" ); + is( scalar $newt->stemmata, 1, "Tradition has its stemma" ); + is( $newt->stemma(0)->witnesses, $t->stemma(0)->witnesses, "Stemma has correct length witness list" ); } }