fix logic bug in build method; add convenience method
[scpubgit/stemmatology.git] / t / text_tradition_language_latin.t
index 4e9d602..4b948f6 100644 (file)
@@ -11,11 +11,11 @@ $| = 1;
 use Text::Tradition;
 use_ok( 'Text::Tradition::Language::Latin' );
 
-eval "use Morph::Perseus";
+eval "use Lingua::Morph::Perseus";
 my $err = $@;
 
 SKIP: {
-       skip "Package Morph::Perseus not found" if $err;
+       skip "Package Lingua::Morph::Perseus not found" if $err;
 
        my $trad = Text::Tradition->new(
                'language' => 'Latin',
@@ -32,13 +32,14 @@ SKIP: {
                $textstr =~ s/\s+//g;
                is( $textstr, $lexstr, "Lexemes for reading $r match the reading" );
                foreach my $l ( @lex ) {
+                       next unless $l->matches;
                        next if $l->is_disambiguated;
                        printf( "Ambiguous lexeme %s for reading %s:\n\t%s\n", $l->string, $r->id,
                                join( "\n\t", map { $_->lemma . ': ' . $_->morphology->to_string } $l->matching_forms ) );
                        $ambig++;
                }
        }
-       is( $ambig, 19, "Found 19 ambiguous forms as expected" );
+       is( $ambig, 4, "Found 4 ambiguous forms as expected" );
 }
 }