Lines Matching refs:ok
30 sub ok
36 print "ok $no\n" ;
106 ok(1, ! defined $dbh->{bsize}) ;
107 ok(2, ! defined $dbh->{ffactor}) ;
108 ok(3, ! defined $dbh->{nelem}) ;
109 ok(4, ! defined $dbh->{cachesize}) ;
110 ok(5, ! defined $dbh->{hash}) ;
111 ok(6, ! defined $dbh->{lorder}) ;
114 ok(7, $dbh->{bsize} == 3000 );
117 ok(8, $dbh->{ffactor} == 9000 );
120 ok(9, $dbh->{nelem} == 400 );
123 ok(10, $dbh->{cachesize} == 65 );
127 ok(11, $dbh->{hash} eq $some_sub );
130 ok(12, $dbh->{lorder} == 1234 );
134 ok(13, $@ =~ /^DB_File::HASHINFO::STORE - Unknown element 'fred' at/ );
136 ok(14, $@ =~ /^DB_File::HASHINFO::FETCH - Unknown element 'fred' at/ );
141 ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
149 ok(16, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640) ||
156 ok(17, !$i );
161 ok(18, $h{'abc'} eq 'ABC' );
162 ok(19, !defined $h{'jimmy'} );
163 ok(20, !exists $h{'jimmy'} );
164 ok(21, exists $h{'abc'} );
196 ok(22, $X = tie(%h,'DB_File',$Dfile, O_RDWR, 0640) );
227 ok(23, $#keys == 29 && $#values == 29) ;
237 ok(24, $i == 30) ;
240 ok(25, $#keys == 31) ;
243 ok(26, $h{'foo'} eq '' );
254 ok(27, $result) ;
257 my $ok = 1;
259 for ($i = 1; $i < 200; $i++) { $ok = 0 unless $h{$i} == $i; }
260 ok(28, $ok );
264 ok(29, $size > 0 );
268 ok(30, join(':',200..400) eq join(':',@foo) );
277 ok(31, $status == 1 );
281 ok(32, $h{'x'} eq 'X' );
285 ok(33, $status == 0 );
290 ok(34, $status == 0 );
291 ok(35, $value eq 'value' );
296 ok(36, $status == 0 );
301 ok(37, $h{'q'} eq undef );
307 ok(38, $status == 1 );
313 ok(39, $status == 1 );
317 ok(40, $status == 0 );
318 ok(41, $value eq 'A' );
333 ok(42, $status == 0 );
340 ok(43, 1 );
341 #ok(43, $status != 0 );
351 ok(44, tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
360 ok(45, $i == 10);
370 ok(46, $i == 0);
377 ok(47, $X = tie(%h, 'DB_File',undef, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
381 ok(48, $status == -1 );
393 ok(49, tie %x, 'DB_File', $filename, O_RDWR|O_CREAT, 0640, $hi ) ;
395 ok(50, $h{"abc"} == 123) ;
398 ok(51, $::count >0) ;
407 ok(52, $@ =~ /^DB_File can only tie an associative array to a DB_HASH database/) ;
474 main::ok(53, $@ eq "") ;
481 main::ok(54, $@ eq "") ;
484 main::ok(55, $@ eq "") ;
485 main::ok(56, $ret == 5) ;
489 main::ok(57, $@ eq "") ;
490 main::ok(58, $ret == 10) ;
493 main::ok(59, $@ eq "" ) ;
494 main::ok(60, $ret == 1) ;
497 main::ok(61, $@ eq "") ;
498 main::ok(62, $ret eq "[[11]]") ;
536 ok(63, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
547 ok(64, checkOutput( "", "fred", "", "joe")) ;
550 ok(65, $h{"fred"} eq "joe");
552 ok(66, checkOutput( "", "fred", "joe", "")) ;
557 ok(67, ! $db->seq($k, $v, R_FIRST) ) ;
558 ok(68, $k eq "fred") ;
559 ok(69, $v eq "joe") ;
561 ok(70, checkOutput( "fred", "fred", "joe", "")) ;
576 ok(71, checkOutput( "", "fred", "", "Jxe")) ;
579 ok(72, $h{"Fred"} eq "[Jxe]");
581 ok(73, checkOutput( "", "fred", "[Jxe]", "")) ;
585 ok(74, ! $db->seq($k, $v, R_FIRST) ) ;
586 ok(75, $k eq "FRED") or
588 ok(76, $v eq "[Jxe]") ;
590 ok(77, checkOutput( "FRED", "fred", "[Jxe]", "")) ;
600 ok(78, checkOutput( "", "fred", "", "joe")) ;
603 ok(79, $h{"fred"} eq "joe");
604 ok(80, checkOutput( "", "fred", "joe", "")) ;
607 #ok(77, $db->FIRSTKEY() eq "fred") ;
609 ok(81, ! $db->seq($k, $v, R_FIRST) ) ;
610 ok(82, $k eq "fred") ;
611 ok(83, $v eq "joe") ;
613 ok(84, checkOutput( "fred", "fred", "joe", "")) ;
623 ok(85, checkOutput( "", "", "", "")) ;
626 ok(86, $h{"fred"} eq "joe");
627 ok(87, checkOutput( "", "", "", "")) ;
631 ok(88, ! $db->seq($k, $v, R_FIRST) ) ;
632 ok(89, $k eq "fred") ;
633 ok(90, $v eq "joe") ;
634 ok(91, checkOutput( "", "", "", "")) ;
649 ok(92, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
673 ok(93, $result{"store key"} eq "store key - 1: [fred]");
674 ok(94, $result{"store value"} eq "store value - 1: [joe]");
675 ok(95, ! defined $result{"fetch key"} );
676 ok(96, ! defined $result{"fetch value"} );
677 ok(97, $_ eq "original") ;
679 ok(98, $db->FIRSTKEY() eq "fred") ;
680 ok(99, $result{"store key"} eq "store key - 1: [fred]");
681 ok(100, $result{"store value"} eq "store value - 1: [joe]");
682 ok(101, $result{"fetch key"} eq "fetch key - 1: [fred]");
683 ok(102, ! defined $result{"fetch value"} );
684 ok(103, $_ eq "original") ;
687 ok(104, $result{"store key"} eq "store key - 2: [fred jim]");
688 ok(105, $result{"store value"} eq "store value - 2: [joe john]");
689 ok(106, $result{"fetch key"} eq "fetch key - 1: [fred]");
690 ok(107, ! defined $result{"fetch value"} );
691 ok(108, $_ eq "original") ;
693 ok(109, $h{"fred"} eq "joe");
694 ok(110, $result{"store key"} eq "store key - 3: [fred jim fred]");
695 ok(111, $result{"store value"} eq "store value - 2: [joe john]");
696 ok(112, $result{"fetch key"} eq "fetch key - 1: [fred]");
697 ok(113, $result{"fetch value"} eq "fetch value - 1: [joe]");
698 ok(114, $_ eq "original") ;
712 ok(115, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
717 ok(116, $@ =~ /^recursion detected in filter_store_key at/ );
762 ok(117, docat_del($file) eq <<'EOM') ;
788 ok(118, $a eq "") ;
807 ok(119, $a eq "") ;
827 ok(120, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
834 ok(121, $h{'Alpha_ABC'} == 2);
835 ok(122, $h{'Alpha_DEF'} == 5);
839 ok(123, $bad_key == 0);
843 ok(124, $bad_key == 0);
847 ok(125, $bad_key == 0);
859 ok(126, $@ =~ /^Key 'hash' not associated with a code reference at/);
873 # ok(127, tie(%hash, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $dbh ) );
879 # ok(128, $@ =~ /^DB_File hash callback: recursion detected/);
887 #ok(127, 1);
888 #ok(128, 1);
906 ok(127, tie(%hash1, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $dbh1 ) );
907 ok(128, tie(%hash2, 'DB_File',$Dfile2, O_RDWR|O_CREAT, 0640, $dbh2 ) );
917 ok(129, $h1_count > 0);
918 ok(130, $h1_count == $h2_count);
920 ok(131, safeUntie \%hash1);
921 ok(132, safeUntie \%hash2);
936 ok(133, $warn_count == 0);
941 ok(134, $warn_count == 0);
945 ok(135, $warn_count == 0);
961 ok(136, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
971 ok(137, $h{"fred"} eq "joe");
974 ok (138, ! $@);
985 ok(139, $h{"fred"} eq "joe");
987 ok(140, $db->FIRSTKEY() eq "fred") ;
990 ok (141, ! $@);
1006 ok(142, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
1020 ok 143, $key == 22;
1021 ok 144, $value == 34 ;
1022 ok 145, $_ eq 'fred';
1027 ok 146, $key == 22;
1028 ok 147, $val == 34 ;
1029 ok 148, $_ eq 'fred';
1034 ok 149, $key == 51;
1035 ok 150, $value == 454 ;
1036 ok 151, $_ eq 'fred';
1058 ok(152, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
1073 ok 153, $warned eq ''
1086 ok 154, $warned eq ''
1100 ok 155, $warned eq ''
1114 ok 156, $warned eq ''
1133 ok 157, keys %bad == 0 ;
1134 ok 158, keys %remember == 0 ;
1144 ok 159, $warned eq ''
1152 ok 160, $no_NULL || $value eq 'fred' or print "# got [$value]\n" ;
1153 ok 161, $warned eq ''
1171 ok(162, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
1194 ok 163, $status == 0 or print "# Status $status\n" ;
1221 ok 164, $_ eq 'fred';
1222 ok 165, keys %bad == 0 ;
1223 ok 166, keys %remember == 0 ;