X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FPing.pm;h=090c29fc786b4c32514fc529eb68c5c712a5daf1;hp=402a98ee0820985cd1a1a945d6cc57c9c4602463;hb=507778500ea1f4148316483a9551fe09c98d7f9c;hpb=d18f6c2cbf1d5afff1d16a0524581d8cccd2ddb9 diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index 402a98e..090c29f 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -1,4 +1,4 @@ -# $Id: Ping.pm,v 1.1 2006-06-20 16:32:42 mike Exp $ +# $Id: Ping.pm,v 1.3 2006-06-21 16:10:18 mike Exp $ # See the "Main" test package for documentation @@ -15,16 +15,28 @@ our @ISA; sub run { my $this = shift(); + my $irspy = $this->irspy(); + my $pod = $irspy->pod(); - print "Running 'Ping' test\n"; - ### Now actually do it + $pod->callback(ZOOM::Event::CONNECT, \&connected); + my $err = $pod->wait($irspy); + + return 0; +} + + +sub connected { + my($conn, $irspy, $rs, $event) = @_; + + my $rec = $irspy->record($conn); + $irspy->log("irspy_test", $conn->option("host"), " connected"); + ### Note the successful connection in $rec return 0; } # Some of this Pod-using code may be useful. # -#my $pod = new ZOOM::Pod(@ARGV); #$pod->option(elementSetName => "b"); #$pod->callback(ZOOM::Event::RECV_SEARCH, \&completed_search); #$pod->callback(ZOOM::Event::RECV_RECORD, \&got_record);