X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftext_tradition.t;h=2c7be1b5afa39b29fcf290a51b8f7f23f82b55d8;hb=ab06f3edf9045dc9a24ee138df7ae0b9bb141098;hp=dd13636a73ae2e7be73e386a86d6498a9f6be363;hpb=9ba651b9a7717e06b04d524277307df39bcfd8e8;p=scpubgit%2Fstemmatology.git diff --git a/t/text_tradition.t b/t/text_tradition.t index dd13636..2c7be1b 100644 --- a/t/text_tradition.t +++ b/t/text_tradition.t @@ -33,7 +33,7 @@ if( $wit_a ) { is( $s->witness('X'), undef, "There is no witness X" ); ok( !exists $s->{'witnesses'}->{'X'}, "Witness key X not created" ); -my $wit_d = $s->add_witness( 'sigil' => 'D' ); +my $wit_d = $s->add_witness( 'sigil' => 'D', 'sourcetype' => 'collation' ); is( ref( $wit_d ), 'Text::Tradition::Witness', "new witness created" ); is( $wit_d->sigil, 'D', "witness has correct sigil" ); is( scalar $s->witnesses, 4, "object now has four witnesses" ); @@ -57,10 +57,12 @@ my $t = Text::Tradition->new( 'file' => 't/data/simple.txt', ); +is( $t->stemma_count, 0, "No stemmas added yet" ); my $s; ok( $s = $t->add_stemma( dotfile => 't/data/simple.dot' ), "Added a simple stemma" ); is( ref( $s ), 'Text::Tradition::Stemma', "Got a stemma object returned" ); -is( $t->stemma, $s, "Stemma is the right one" ); +is( $t->stemma_count, 1, "Tradition claims to have a stemma" ); +is( $t->stemma(0), $s, "Tradition hands back the right stemma" ); }