break out punctuation from the rest of the reading text
[scpubgit/stemmatology.git] / t / text_tradition_collation.t
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 $cxfile = 't/data/Collatex-16.xml';
14 my $t = Text::Tradition->new( 
15     'name'  => 'inline', 
16     'input' => 'CollateX',
17     'file'  => $cxfile,
18     );
19 my $c = $t->collation;
20
21 is( $c->common_predecessor( $c->reading('n9'), $c->reading('n23') )->id, 
22     'n20', "Found correct common predecessor" );
23 is( $c->common_successor( $c->reading('n9'), $c->reading('n23') )->id, 
24     '#END#', "Found correct common successor" );
25
26 is( $c->common_predecessor( $c->reading('n19'), $c->reading('n17') )->id, 
27     'n16', "Found correct common predecessor for readings on same path" );
28 is( $c->common_successor( $c->reading('n21'), $c->reading('n26') )->id, 
29     '#END#', "Found correct common successor for readings on same path" );
30 }
31
32
33
34
35 1;