X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=t%2F2-ZOOM.t;h=ab2a90b91128b161579f73ebcf1b4e8195a9976f;hb=18b078e9a9ec27af837756936018caec5481dd9d;hp=97f6dcf2d20be59fcf9bd7ec328b66731bc985dc;hpb=76750bbe816fa23f8902c9f12ee29b2470a358a6;p=ZOOM-Perl-moved-to-github.git diff --git a/t/2-ZOOM.t b/t/2-ZOOM.t index 97f6dcf..ab2a90b 100644 --- a/t/2-ZOOM.t +++ b/t/2-ZOOM.t @@ -1,21 +1,13 @@ -# $Id: 2-ZOOM.t,v 1.6 2005-10-17 13:50:06 mike Exp $ +# $Id: 2-ZOOM.t,v 1.8 2005-10-31 15:02:41 mike Exp $ # Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl ZOOM.t' - -######################### - -# change 'tests => 1' to 'tests => last_test_to_print'; +# `make test'. After `make install' it should work as `perl 2-ZOOM.t' use strict; +use warnings; use Test::More tests => 21; BEGIN { use_ok('ZOOM') }; -######################### - -# Insert your test code below, the Test::More module is use()ed here so read -# its man page ( perldoc Test::More ) for help writing this test script. - my $msg = ZOOM::diag_str(ZOOM::Error::INVALID_QUERY); ok($msg eq "Invalid query", "diagnostic string lookup works"); @@ -80,7 +72,7 @@ ok($n == 1, "found 1 record as expected"); my $rec = $rs->record(0); my $data = $rec->render(); -ok($data =~ /245 +\$a ISOTOPIC DATES OF ROCKS AND MINERALS/, +ok($data =~ /^245 +\$a ISOTOPIC DATES OF ROCKS AND MINERALS$/m, "rendered record has expected title"); my $raw = $rec->raw(); ok($raw =~ /^00981n/, "raw record contains expected header");