4 use Test::More 'no_plan';
11 use_ok( 'Text::Tradition::Witness', "can use module" );
13 my @text = qw( This is a line of text );
14 my $wit = Text::Tradition::Witness->new(
18 is( ref( $wit ), 'Text::Tradition::Witness', 'Created a witness' );
20 is( $wit->sigil, 'A', "Witness has correct sigil" );
21 is( join( ' ', @{$wit->text} ), join( ' ', @text ), "Witness has correct text" );
31 my $simple = 't/data/simple.txt';
32 my $s = Text::Tradition->new(
37 my $wit_c = $s->witness( 'C' );
38 is( ref( $wit_c ), 'Text::Tradition::Witness' ),;
40 ok( !$wit_c->has_text, "Text property not yet set" );
41 my $c_arr = $wit_c->text;
42 is( $c_arr->[0], 'Je', "Text constructed from path" );
43 ok( $wit_c->has_text, "Text property now set" );