122b170fc7cb8b6060e629542cdc34cd720ad096
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test / Search / Title.pm
1 # $Id: Title.pm,v 1.2 2006-07-11 14:16:35 mike Exp $
2
3 # See the "Main" test package for documentation
4
5 package ZOOM::IRSpy::Test::Search::Title;
6
7 use 5.008;
8 use strict;
9 use warnings;
10
11 use ZOOM::IRSpy::Test;
12 our @ISA;
13 @ISA = qw(ZOOM::IRSpy::Test);
14
15
16 sub run {
17     my $this = shift();
18     my $irspy = $this->irspy();
19     my $pod = $irspy->pod();
20
21     $pod->callback(ZOOM::Event::RECV_SEARCH, \&found);
22     $pod->search_pqf('@attr 1=4 computer');
23     my $err = $pod->wait($irspy);
24
25     return 0;
26 }
27
28
29 sub found {
30     my($conn, $irspy, $rs, $event) = @_;
31
32     my $rec = $irspy->record($conn);
33     my $n = $rs->size();
34     $irspy->log("irspy_test", $conn->option("host"),
35                 " title search found $n record", $n==1 ? "" : "s");
36     ### We should note the success or failure of the search in $rec
37     return 0;
38 }
39
40
41 1;