get JSON witness parsing to work
[scpubgit/stemmatology.git] / t / text_tradition.t
index 2c36c23..6e47f40 100644 (file)
@@ -47,5 +47,25 @@ is( scalar $s->witnesses, 3, "object has three witnesses again" );
 
 
 
+# =begin testing
+{
+use Text::Tradition;
+
+my $t = Text::Tradition->new( 
+    'name'  => 'simple test', 
+    'input' => 'Tabular',
+    '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_count, 1, "Tradition claims to have a stemma" );
+is( $t->stemma(0), $s, "Tradition hands back the right stemma" );
+}
+
+
+
 
 1;