/[Search-Estraier]/trunk/t/1_Document.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/1_Document.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 59 by dpavlin, Thu Jan 5 15:05:58 2006 UTC revision 60 by dpavlin, Sat Jan 7 00:00:15 2006 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 31;  use Test::More tests => 37;
7  use Test::Exception;  use Test::Exception;
8  use Data::Dumper;  use Data::Dumper;
9    
# Line 47  foreach my $t (@test_texts) { Line 47  foreach my $t (@test_texts) {
47    
48  ok($doc->add_hidden_text('This is hidden text'), 'add_hidden_text');  ok($doc->add_hidden_text('This is hidden text'), 'add_hidden_text');
49    
50  throws_ok { my $text = $doc->texts } qr/return array/, 'texts scalar';  ok(my @texts = $doc->texts, 'texts');
 ok(my @texts = $doc->texts, 'texts array');  
51    
52  ok(my $draft = $doc->dump_draft, 'dump_draft');  ok(my $draft = $doc->dump_draft, 'dump_draft');
53    
# Line 82  ok(eq_array(\@test_texts, \@texts), 'tex Line 81  ok(eq_array(\@test_texts, \@texts), 'tex
81  ok(my $cat_text = $doc->cat_texts, 'cat_text');  ok(my $cat_text = $doc->cat_texts, 'cat_text');
82  #diag "cat_texts: $cat_text";  #diag "cat_texts: $cat_text";
83    
84    ok($doc = new Search::Estraier::Document, 'new empty');
85    ok(! $doc->texts, 'texts');
86    cmp_ok($doc->dump_draft, 'eq', "\n", 'dump_draft');
87    cmp_ok($doc->id, '==', -1, 'id');
88    ok(! $doc->attr_names, 'attr_names');
89    ok(! $doc->attr(undef), 'attr');
90    ok(! $doc->cat_texts, 'cat_texts');
91    
92  #diag Dumper($doc);  #diag Dumper($doc);

Legend:
Removed from v.59  
changed lines
  Added in v.60

  ViewVC Help
Powered by ViewVC 1.1.26