X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=t%2F28-charset.t;h=11c6cbf75e1c1789f10d49774133682d6de747eb;hb=fc7deb12a6edf1333b40f9176cd929489a7b39df;hp=6e88351b8a4fa55006186423db0d18fcd6bf2d77;hpb=c8f4bd4dd3f4c993f8ead2edc05ebff000377a6e;p=ZOOM-Perl-moved-to-github.git diff --git a/t/28-charset.t b/t/28-charset.t index 6e88351..11c6cbf 100644 --- a/t/28-charset.t +++ b/t/28-charset.t @@ -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(10\. .* f\350ur), +ok($xml =~ m(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(10\. .* für), +ok($xml =~ m(aus der .* für), "got Unicode post-accented composed characters");