Number of search-hits included in log message.
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test / Record / Fetch.pm
index 6021ade..347c054 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Fetch.pm,v 1.11 2006-10-31 12:42:32 mike Exp $
+# $Id: Fetch.pm,v 1.13 2006-11-02 15:02:09 mike Exp $
 
 # See the "Main" test package for documentation
 
@@ -28,7 +28,8 @@ sub start {
 sub completed_search {
     my($conn, $task, $udata, $event) = @_;
 
-    $conn->log("irspy_test", "Fetch test search succeeded");
+    my $n = $task->{rs}->size();
+    $conn->log("irspy_test", "Fetch test search found $n records");
     my @syntax = (
                    'canmarc',
                    'danmarc',
@@ -91,7 +92,7 @@ sub record {
 
     $conn->record()->store_result('record_fetch',
                                   'syntax'   => $syn,
-                                  'ok'       => defined $text);
+                                  'ok'       => defined $text ? 1 : 0);
 
     return ZOOM::IRSpy::Status::TASK_DONE;
 }