make tabular parse test work
[scpubgit/stemmatology.git] / t / stemma.t
CommitLineData
6f4946fb 1#!/usr/bin/perl
2
3use strict; use warnings;
4use Test::More;
5use lib 'lib';
6use Text::Tradition;
7use Text::Tradition::Stemma;
8use XML::LibXML;
9use XML::LibXML::XPathContext;
10
11my $datafile = 't/data/Collatex-16.xml'; #TODO need other test data
12
7035e3a6 13my $tradition = Text::Tradition->new(
14 'name' => 'inline',
15 'input' => 'CollateX',
16 'file' => $datafile,
17 );
18my $stemma = Text::Tradition::Stemma->new( 'collation' => $tradition->collation );
6f4946fb 19
20# Test for object creation
21ok( $stemma->isa( 'Text::Tradition::Stemma' ), 'Got the right sort of object' );
22
23# Test for character matrix creation
24$stemma->make_character_matrix();
25 ## check number of rows
26 ## check number of columns
27
28# Test that pars runs
7035e3a6 29my( $status, $tree ) = $stemma->run_phylip_pars();
6f4946fb 30ok( $status, "pars ran successfully" );
31print STDERR "Error was $tree\n" unless $status;
32
33# Test that we get a tree
34
35# Test that the tree has all our witnesses
7035e3a6 36
37done_testing();