change "z3950.loc.gov:7090" in documentation and examples, ZOOM-23
[ZOOM-Perl-moved-to-github.git] / t / 28-charset.t
index 6e88351..11c6cbf 100644 (file)
@@ -1,5 +1,3 @@
-# $Id: 28-charset.t,v 1.1 2006-04-03 17:23:56 mike Exp $
-
 # Before `make install' is performed this script should be runnable with
 # `make test'. After `make install' it should work as `perl 28-charset.t'
 
@@ -9,20 +7,20 @@ use Test::More tests => 9;
 
 BEGIN { use_ok('ZOOM') };
 
-my $host = "z3950.loc.gov:7090/voyager";
+my $host = "lx2.loc.gov:210/LCDB";
 my $conn;
 eval { $conn = new ZOOM::Connection($host) };
 ok(!$@, "connection to '$host'");
 
 $conn->option(preferredRecordSyntax => 'usmarc');
 
-my $qstr = '@attr 1=1003 gunter';
+my $qstr = '@attr 1=7 3879093520';
 my $rs;
 eval { $rs = $conn->search_pqf($qstr) };
 ok(!$@, "search for '$qstr'");
 
 my $n = $rs->size();
-ok($n == 10000, "found $n records (expected 10000)");
+ok($n == 1, "found $n records (expected 1)");
 
 my $rec = $rs->record(0);
 ok(defined $rec, "got first record");
@@ -30,12 +28,12 @@ ok(defined $rec, "got first record");
 my $xml = $rec->get('xml');
 ok(defined $xml, "got XML");
 
-ok($xml =~ m(<subfield code="a">10\. .* f\350ur),
+ok($xml =~ m(<subfield code="b">aus der .* f\350ur),
    "got MARC pre-accented composed characters");
 
 $xml = $rec->get('xml', 'charset=marc-8,utf-8');
 ok(defined $xml, "got XML in Unicode");
 
-ok($xml =~ m(<subfield code="a">10\. .* für),
+ok($xml =~ m(<subfield code="b">aus der .* für),
    "got Unicode post-accented composed characters");