From 8b9eebbb053a985c82939b992d56d072a9d45b26 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 12 Dec 2012 09:32:12 +0000 Subject: [PATCH] Record::Fetch test registers a fail when the syntax actually retrieved does not match that requested. Fixes bug IR-324. --- lib/ZOOM/IRSpy/Test/Record/Fetch.pm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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; + } } } -- 1.7.10.4