/[wait]/cvs-head/t/wais.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /cvs-head/t/wais.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 62 by ulpfr, Sat Nov 11 17:24:38 2000 UTC revision 63 by laperla, Mon Jan 14 23:29:20 2002 UTC
# Line 18  use WAIT::Database; Line 18  use WAIT::Database;
18  use WAIT::Wais;  use WAIT::Wais;
19  use Cwd;  use Cwd;
20  use strict;  use strict;
21    use File::Path qw(mkpath rmtree);
22    
23  $SIG{__DIE__} = $SIG{INT} = \&cleanup;  $SIG{__DIE__} = $SIG{INT} = \&cleanup;
24    
25  my $pwd = getcwd();  my $pwd = getcwd();
26  print  "$^X -Mblib blib/script/bibdb -dir /tmp -database sample\n";  mkpath "/tmp/wait-test-$$";
27  system "$^X -Mblib blib/script/bibdb -dir /tmp -database sample > /dev/null 2>&1";  print  "$^X -Mblib blib/script/bibdb -dir /tmp/wait-test-$$ -database sample\n";
28    system "$^X -Mblib blib/script/bibdb -dir /tmp/wait-test-$$ -database sample > /dev/null 2>&1";
29  print "1..7\n";  print "1..7\n";
30    
31  use Fcntl;  use Fcntl;
32  if (1) {  if (1) {
33    my $db = WAIT::Database->open(    my $db = WAIT::Database->open(
34                                  name        => 'sample',                                  name        => 'sample',
35                                  'directory' => '/tmp',                                  'directory' => "/tmp/wait-test-$$",
36                                  'mode'      => O_RDWR,                                  'mode'      => O_RDWR,
37                                 );                                 );
38    print "not " unless $db;    print "not " unless $db;
# Line 50  if (1) { Line 52  if (1) {
52  }  }
53    
54    
55  my $db = '/tmp/sample/bibdb';  my $db = "/tmp/wait-test-$$/sample/bibdb";
56  print "# Testing WAIT searches\n";  print "# Testing WAIT searches\n";
57  my $result = WAIT::Wais::Search({  my $result = WAIT::Wais::Search({
58                                   'query'    => 'pfeifer',                                   'query'    => 'pfeifer',
# Line 60  my $result = WAIT::Wais::Search({ Line 62  my $result = WAIT::Wais::Search({
62  &headlines($result);  &headlines($result);
63  my $id     = ($result->header)[9]->[6];  my $id     = ($result->header)[9]->[6];
64  # no strict order  # no strict order
65  $$id = 'wait;/tmp/sample/bibdb;13';  $$id = "wait;/tmp/wait-test-$$/sample/bibdb;13";
66  #$length = ($result->header)[9]->[3];  #$length = ($result->header)[9]->[3];
67  my @header = $result->header;  my @header = $result->header;
68    
# Line 111  open STDERR, '>/dev/null'; Line 113  open STDERR, '>/dev/null';
113    
114  sub cleanup  sub cleanup
115  {  {
116    system 'rm -rf /tmp/sample';    rmtree "/tmp/wait-test-$$";
117  }  }
118    
119    

Legend:
Removed from v.62  
changed lines
  Added in v.63

  ViewVC Help
Powered by ViewVC 1.1.26