projects
/
ZOOM-Perl-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Describe ZOOM::Connection->create()'s new ability to take name-value
[ZOOM-Perl-moved-to-github.git]
/
t
/
23-resultset.t
diff --git
a/t/23-resultset.t
b/t/23-resultset.t
index
31917d9
..
5e4d9c8
100644
(file)
--- a/
t/23-resultset.t
+++ b/
t/23-resultset.t
@@
-1,14
+1,14
@@
-# $Id: 23-resultset.t,v 1.2 2005-11-04 16:21:04 mike Exp $
+# $Id: 23-resultset.t,v 1.5 2006-11-02 17:48:26 mike Exp $
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 23-resultset.t'
use strict;
use warnings;
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 23-resultset.t'
use strict;
use warnings;
-use Test::More tests => 19;
+use Test::More tests => 23;
BEGIN { use_ok('ZOOM') };
BEGIN { use_ok('ZOOM') };
-my $host = "indexdata.com/gils";
+my $host = "z3950.indexdata.com/gils";
my $conn;
eval { $conn = new ZOOM::Connection($host, 0) };
ok(!$@, "connection to '$host'");
my $conn;
eval { $conn = new ZOOM::Connection($host, 0) };
ok(!$@, "connection to '$host'");
@@
-36,6
+36,8
@@
ok(length($data2) < length($data1), "re-fetched record is brief, old was full");
$rs->option(preferredRecordSyntax => "xml");
$rec = $rs->record(0);
$rs->option(preferredRecordSyntax => "xml");
$rec = $rs->record(0);
+my $cloned = $rec->clone();
+ok(defined $cloned, "cloned record");
$data2 = $rec->render();
ok($data2 =~ /<title>/i, "option for XML syntax is honoured");
$data2 = $rec->render();
ok($data2 =~ /<title>/i, "option for XML syntax is honoured");
@@
-71,3
+73,9
@@
$rs->destroy();
ok(1, "destroyed result-set");
$conn->destroy();
ok(1, "destroyed connection");
ok(1, "destroyed result-set");
$conn->destroy();
ok(1, "destroyed connection");
+
+$data3 = $cloned->render();
+ok(1, "rendered cloned record after its result-set was destroyed");
+ok($data3 eq $data2, "render of clone as expected");
+$cloned->destroy();
+ok(1, "destroyed cloned record");