1 # $Id: Fetch.pm,v 1.3 2006-10-25 09:18:28 sondberg Exp $
3 # See the "Main" test package for documentation
5 package ZOOM::IRSpy::Test::Record::Fetch;
11 use ZOOM::IRSpy::Test;
12 our @ISA = qw(ZOOM::IRSpy::Test);
18 my @syntax = ( 'canmarc',
39 foreach my $syn (@syntax) {
40 $conn->option('preferredRecordSyntax' => $syn);
41 $conn->option('start' => 0);
42 $conn->option('count' => 1);
44 ## Here I want to get a use attribute from the session, which we've
45 ## managed to search for in the Search/Bib1 or Search/Dan1 tests. But
46 ## how? So far we search for title: 1=4
47 $conn->irspy_search_pqf("\@attr 1=4 mineral",
49 ZOOM::Event::RECV_RECORD, \&record,
50 exception => \&error);
56 my($conn, $task, $test_args, $event) = @_;
57 my $syn = $test_args->{'syntax'};
61 print STDERR $rs->record(0)->render();
64 $conn->log("irspy_test", "Successfully retrieved a $syn record");
65 $conn->record()->store_result('record_fetch',
69 return ZOOM::IRSpy::Status::TASK_DONE;
74 my($conn, $task, $test_args, $exception) = @_;
75 my $syn = $test_args->{'syntax'};
77 $conn->log("irspy_test", "Retrieval of $syn record failed:", $exception);
78 $conn->record()->store_result('record_fetch',
81 return ZOOM::IRSpy::Status::TASK_DONE;