Commit | Line | Data |
951ddfe8 |
1 | #!/usr/bin/perl -w |
2 | |
3 | use strict; |
4 | use Test::More 'no_plan'; |
5 | $| = 1; |
6 | |
7 | |
8 | |
9 | # =begin testing |
10 | { |
11 | use Text::Tradition; |
12 | |
13 | my $t = Text::Tradition->new( |
14 | 'name' => 'simple test', |
15 | 'input' => 'Tabular', |
16 | 'file' => 't/data/simple.txt', |
17 | ); |
951ddfe8 |
18 | is( $t->stemma_count, 0, "No stemmas added yet" ); |
19 | my $s; |
20 | ok( $s = $t->add_stemma( dotfile => 't/data/simple.dot' ), "Added a simple stemma" ); |
21 | is( ref( $s ), 'Text::Tradition::Stemma', "Got a stemma object returned" ); |
22 | is( $t->stemma_count, 1, "Tradition claims to have a stemma" ); |
23 | is( $t->stemma(0), $s, "Tradition hands back the right stemma" ); |
24 | } |
25 | |
26 | |
27 | |
28 | |
29 | 1; |