From: Mike Taylor Date: Wed, 12 Dec 2012 09:32:12 +0000 (+0000) Subject: Record::Fetch test registers a fail when the syntax actually retrieved X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=8b9eebbb053a985c82939b992d56d072a9d45b26 Record::Fetch test registers a fail when the syntax actually retrieved does not match that requested. Fixes bug IR-324. --- diff --git a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm index 5e62a96..f12d137 100644 --- a/lib/ZOOM/IRSpy/Test/Record/Fetch.pm +++ b/lib/ZOOM/IRSpy/Test/Record/Fetch.pm @@ -121,13 +121,18 @@ sub record { defined $record ? $record->exception() : $conn->exception()); } else { - $ok = 1; - my $text = $record->render(); - $conn->log("irspy_test", "Successfully retrieved a $syn record"); - if (0) { - print STDERR "Hits: ", $rs->size(), "\n"; - print STDERR "Syntax: ", $syn, "\n"; - print STDERR $text; + my $actual = $record->get("syntax"); + if (lc($actual) ne lc($syn)) { + $conn->log("irspy_test", "requested $syn record, but got $actual"); + } else { + $ok = 1; + my $text = $record->render(); + $conn->log("irspy_test", "Successfully retrieved a $syn record ($actual)"); + if (0) { + print STDERR "Hits: ", $rs->size(), "\n"; + print STDERR "Syntax: ", $syn, "\n"; + print STDERR $text; + } } }