/[Search-Estraier]/trunk/t/2_Condition.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

Annotation of /trunk/t/2_Condition.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17 - (hide annotations)
Wed Jan 4 22:46:16 2006 UTC (18 years, 2 months ago) by dpavlin
Original Path: trunk/t/2_condition.t
File MIME type: application/x-troff
File size: 620 byte(s)
missing test for set_options (in last commit)
1 dpavlin 15 #!/usr/bin/perl -w
2    
3     use strict;
4     use blib;
5    
6 dpavlin 17 use Test::More tests => 14;
7 dpavlin 16 use Test::Exception;
8 dpavlin 15 #use Data::Dumper;
9    
10     BEGIN { use_ok('Search::Estraier') };
11    
12     ok(my $cond = new Search::Estraier::Condition, 'new');
13     isa_ok($cond, 'Search::Estraier::Condition');
14    
15 dpavlin 16 ok($cond->set_phrase('search'), 'set_phrase');
16     ok($cond->add_attr('@foo BAR baz'), 'set_phrase');
17     ok($cond->set_order('@foo ASC'), 'set_order');
18     ok($cond->set_max(42), 'set_max, number');
19     throws_ok { $cond->set_max('foo') } qr/number/, 'set_max, NaN';
20 dpavlin 17
21     foreach my $opt (qw/SURE USUAL FAST AGITO NOIDF SIMPLE/) {
22     ok($cond->set_options( $opt ), 'set_option '.$opt);
23     }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26