remove some debugging statements
[scpubgit/stemmatology.git] / t / 01app.t
index 77eadc8..98728ec 100644 (file)
--- a/t/01app.t
+++ b/t/01app.t
@@ -1,8 +1,30 @@
 #!/usr/bin/env perl
 use strict;
 use warnings;
-use Test::More tests => 2;
+use lib 'lib';
+use Test::More;
+use Text::Tradition;
 
-BEGIN { use_ok 'Catalyst::Test', 'lemmatizer' }
+binmode STDOUT, ":utf8";
+binmode STDERR, ":utf8";
+eval { no warnings; binmode $DB::OUT, ":utf8"; };
 
-ok( request('/')->is_success, 'Request should succeed' );
+BEGIN { use_ok 'Text::Tradition' }
+
+# A simple test, just to make sure we can parse a graph.
+my $datafile = 't/data/florilegium_tei_ps.xml';
+my $tradition = Text::Tradition->new( 'input' => 'TEI',
+                                      'name' => 'test0',
+                                      'file' => $datafile,
+                                      'linear' => 1 );
+
+ok( $tradition, "Got a tradition object" );
+is( scalar $tradition->witnesses, 13, "Found all witnesses" );
+ok( $tradition->collation, "Tradition has a collation" );
+
+my $c = $tradition->collation;
+is( scalar $c->readings, 311, "Collation has all readings" );
+is( scalar $c->paths, 361, "Collation has all paths" );
+is( scalar $c->relationships, 0, "Collation has all relationships" );
+
+done_testing;
\ No newline at end of file