diff options
Diffstat (limited to 't/store.t')
-rw-r--r-- | t/store.t | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -29,8 +29,24 @@ subtest 'indexing' => { subtest 'finding' => { my Channel $file-channel .= new; - my TestIndex $index1 .= new(:responses('1',Str,'1',Str),:name('index1')); - my TestIndex $index2 .= new(:responses('2',Str,Str,Str),:name('index2')); + my TestIndex $index1 .= new( + :responses( + Mailbox.new(:name('1'),:1confidence), + Mailbox, + Mailbox.new(:name('1'),:confidence(0.5)), + Mailbox + ), + :name('index1') + ); + my TestIndex $index2 .= new( + :responses( + Mailbox.new(:name('2'),:confidence(0.5)), + Mailbox, + Mailbox.new(:name('2'),:1confidence), + Mailbox + ), + :name('index2') + ); my MaildirIndexer::Store $store .= new( :$file-channel, @@ -43,8 +59,8 @@ subtest 'finding' => { is-deeply( @responses, - $['1','2','1',Str], - 'indexes are consulted until a defined value', + $['1',Str,'2',Str], + 'indexes are consulted, undefs ignored, highest confidence wins', ); } |