--- trunk/t/1_Document.t 2006/01/05 15:05:58 26 +++ trunk/t/1_Document.t 2006/01/07 00:00:15 60 @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 31; +use Test::More tests => 37; use Test::Exception; use Data::Dumper; @@ -47,8 +47,7 @@ ok($doc->add_hidden_text('This is hidden text'), 'add_hidden_text'); -throws_ok { my $text = $doc->texts } qr/return array/, 'texts scalar'; -ok(my @texts = $doc->texts, 'texts array'); +ok(my @texts = $doc->texts, 'texts'); ok(my $draft = $doc->dump_draft, 'dump_draft'); @@ -82,4 +81,12 @@ ok(my $cat_text = $doc->cat_texts, 'cat_text'); #diag "cat_texts: $cat_text"; +ok($doc = new Search::Estraier::Document, 'new empty'); +ok(! $doc->texts, 'texts'); +cmp_ok($doc->dump_draft, 'eq', "\n", 'dump_draft'); +cmp_ok($doc->id, '==', -1, 'id'); +ok(! $doc->attr_names, 'attr_names'); +ok(! $doc->attr(undef), 'attr'); +ok(! $doc->cat_texts, 'cat_texts'); + #diag Dumper($doc);