• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/perl/DB_File/t/

Lines Matching refs:ok

46 sub ok
52 print "ok $no\n" ;
143 ok(1, ! defined $dbh->{flags}) ;
144 ok(2, ! defined $dbh->{cachesize}) ;
145 ok(3, ! defined $dbh->{psize}) ;
146 ok(4, ! defined $dbh->{lorder}) ;
147 ok(5, ! defined $dbh->{minkeypage}) ;
148 ok(6, ! defined $dbh->{maxkeypage}) ;
149 ok(7, ! defined $dbh->{compare}) ;
150 ok(8, ! defined $dbh->{prefix}) ;
153 ok(9, $dbh->{flags} == 3000) ;
156 ok(10, $dbh->{cachesize} == 9000);
159 ok(11, $dbh->{psize} == 400) ;
162 ok(12, $dbh->{lorder} == 65) ;
165 ok(13, $dbh->{minkeypage} == 123) ;
168 ok(14, $dbh->{maxkeypage} == 1234 );
172 ok(15, $@ =~ /^DB_File::BTREEINFO::STORE - Unknown element 'fred' at/ ) ;
174 ok(16, $@ =~ /^DB_File::BTREEINFO::FETCH - Unknown element 'fred' at/ ) ;
179 ok(17, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ;
187 ok(18, ($mode & 0777) == (($^O eq 'os2' || $^O eq 'MacOS') ? 0666 : 0640)
194 ok(19, !$i ) ;
199 ok(20, $h{'abc'} eq 'ABC' );
200 ok(21, ! defined $h{'jimmy'} ) ;
201 ok(22, ! exists $h{'jimmy'} ) ;
202 ok(23, defined $h{'abc'} ) ;
233 ok(24, $X = tie(%h,'DB_File',$Dfile, O_RDWR, 0640, $DB_BTREE)) ;
264 ok(25, $#keys == 29 && $#values == 29) ;
274 ok(26, $i == 30) ;
277 ok(27, $#keys == 31) ;
282 ok(28, ArrayCompare(\@b, \@c)) ;
285 ok(29, $h{'foo'} eq '' ) ;
296 ok(30, $result) ;
299 my $ok = 1;
301 for ($i = 1; $i < 200; $i++) { $ok = 0 unless $h{$i} == $i; }
302 ok(31, $ok);
306 ok(32, $size > 0 );
310 ok(33, join(':',200..400) eq join(':',@foo) );
319 ok(34, $status == 1 );
323 ok(35, $h{'x'} eq 'X' );
327 ok(36, $status == 0 );
332 ok(37, $status == 0 );
333 ok(38, $value eq 'value' );
338 ok(39, $status == 0 );
344 ok(40, $status == 0 );
347 ok(41, ! defined $h{'q'}) ;
348 ok(42, ! defined $h{''}) ;
353 ok(43, $X = tie(%h, 'DB_File',$Dfile, O_RDWR, 0640, $DB_BTREE ));
358 ok(44, $status == 1 );
364 ok(45, $status == 1 );
368 ok(46, $status == 0 );
369 ok(47, $value eq 'A' );
378 ok(48, $status == 0 );
379 ok(49, $key eq 'key' );
380 ok(50, $value eq 'value' );
386 ok(51, $status == 1 );
394 ok(52, $status == 0 );
395 ok(53, $key eq 'x' );
396 ok(54, $value eq 'X' );
398 ok(55, $status == 0 );
400 ok(56, $status == 1 );
406 ok(57, $status == 0 );
407 ok(58, $key eq 'y' );
408 ok(59, $value eq 'Y' );
413 ok(60, $status == 0 );
414 ok(61, $key eq 'replace key' );
415 ok(62, $value eq 'replace value' );
417 ok(63, 1) ; # hard-wire to always pass. the previous test ($status == 1)
423 ok(64, $status == 0 );
426 $ok = 1 ;
429 ($ok = 0), last if ($previous cmp $key) == 1 ;
432 ok(65, $status == 1 );
433 ok(66, $ok == 1 );
437 ok(67, $status == 0 );
440 $ok = 1 ;
443 ($ok = 0), last if ($previous cmp $key) == -1 ;
447 ok(68, $status == 1 );
448 ok(69, $ok == 1 );
457 ok(70, $status == 0 );
464 ok(71, 1 );
465 #ok(71, $status != 0 );
475 ok(72, $Y = tie(%h, 'DB_File',undef, O_RDWR|O_CREAT, 0640, $DB_BTREE ));
479 ok(73, $status == -1 );
489 ok(74, $YY = tie(%hh, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $bt )) ;
499 ok(75, scalar $YY->get_dup('Unknown') == 0 );
500 ok(76, scalar $YY->get_dup('Smith') == 1 );
501 ok(77, scalar $YY->get_dup('Wall') == 4 );
505 ok(78, "@unknown" eq "" );
508 ok(79, "@smith" eq "John" );
514 ok(80, (@wall == 4 && $wall{'Larry'} && $wall{'Stone'} && $wall{'Brick'}) );
519 ok(81, keys %unknown == 0 );
522 ok(82, keys %smith == 1 && $smith{'John'}) ;
525 ok(83, keys %wall == 3 && $wall{'Larry'} == 1 && $wall{'Stone'} == 1
584 ok(84, ArrayCompare (\@srt_1, [keys %h]) );
585 ok(85, ArrayCompare (\@srt_2, [keys %g]) );
586 ok(86, ArrayCompare (\@srt_3, [keys %k]) );
596 ok(87, tie(%h, 'DB_File', $Dfile1, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
605 ok(88, $i == 10);
615 ok(89, $i == 0);
626 ok(90, $@ =~ /^DB_File can only tie an associative array to a DB_BTREE database/) ;
693 main::ok(91, $@ eq "") ;
700 main::ok(92, $@ eq "") ;
703 main::ok(93, $@ eq "") ;
704 main::ok(94, $ret == 5) ;
708 main::ok(95, $@ eq "") ;
709 main::ok(96, $ret == 10) ;
712 main::ok(97, $@ eq "" ) ;
713 main::ok(98, $ret == 1) ;
716 main::ok(99, $@ eq "") ;
717 main::ok(100, $ret eq "[[11]]") ;
742 ok(101, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
753 ok(102, checkOutput( "", "fred", "", "joe")) ;
756 ok(103, $h{"fred"} eq "joe");
758 ok(104, checkOutput( "", "fred", "joe", "")) ;
761 ok(105, $db->FIRSTKEY() eq "fred") ;
763 ok(106, checkOutput( "fred", "", "", "")) ;
778 ok(107, checkOutput( "", "fred", "", "Jxe")) ;
781 ok(108, $h{"Fred"} eq "[Jxe]");
783 ok(109, checkOutput( "", "fred", "[Jxe]", "")) ;
786 ok(110, $db->FIRSTKEY() eq "FRED") ;
788 ok(111, checkOutput( "FRED", "", "", "")) ;
798 ok(112, checkOutput( "", "fred", "", "joe")) ;
801 ok(113, $h{"fred"} eq "joe");
802 ok(114, checkOutput( "", "fred", "joe", "")) ;
805 ok(115, $db->FIRSTKEY() eq "fred") ;
806 ok(116, checkOutput( "fred", "", "", "")) ;
816 ok(117, checkOutput( "", "", "", "")) ;
819 ok(118, $h{"fred"} eq "joe");
820 ok(119, checkOutput( "", "", "", "")) ;
823 ok(120, $db->FIRSTKEY() eq "fred") ;
824 ok(121, checkOutput( "", "", "", "")) ;
839 ok(122, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
863 ok(123, $result{"store key"} eq "store key - 1: [fred]");
864 ok(124, $result{"store value"} eq "store value - 1: [joe]");
865 ok(125, ! defined $result{"fetch key"} );
866 ok(126, ! defined $result{"fetch value"} );
867 ok(127, $_ eq "original") ;
869 ok(128, $db->FIRSTKEY() eq "fred") ;
870 ok(129, $result{"store key"} eq "store key - 1: [fred]");
871 ok(130, $result{"store value"} eq "store value - 1: [joe]");
872 ok(131, $result{"fetch key"} eq "fetch key - 1: [fred]");
873 ok(132, ! defined $result{"fetch value"} );
874 ok(133, $_ eq "original") ;
877 ok(134, $result{"store key"} eq "store key - 2: [fred jim]");
878 ok(135, $result{"store value"} eq "store value - 2: [joe john]");
879 ok(136, $result{"fetch key"} eq "fetch key - 1: [fred]");
880 ok(137, ! defined $result{"fetch value"} );
881 ok(138, $_ eq "original") ;
883 ok(139, $h{"fred"} eq "joe");
884 ok(140, $result{"store key"} eq "store key - 3: [fred jim fred]");
885 ok(141, $result{"store value"} eq "store value - 2: [joe john]");
886 ok(142, $result{"fetch key"} eq "fetch key - 1: [fred]");
887 ok(143, $result{"fetch value"} eq "fetch value - 1: [joe]");
888 ok(144, $_ eq "original") ;
902 ok(145, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
907 ok(146, $@ =~ /^recursion detected in filter_store_key at/ );
967 ok(147, docat_del($file) eq <<'EOM') ;
1011 ok(148, docat_del($file) eq ($db185mode ? <<'EOM' : <<'EOM') ) ;
1066 ok(149, docat_del($file) eq ($db185mode == 1 ? <<'EOM' : <<'EOM') ) ;
1121 ok(150, docat_del($file) eq <<'EOM') ;
1160 ok(151, docat_del($file) eq <<'EOM') ;
1196 ok(152, docat_del($file) eq <<'EOM') ;
1256 ok(153, docat_del($file) eq <<'EOM') ;
1277 # ok(156, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
1284 # ok(157, $status == 0) ;
1287 # ok(158, $status == 0) ;
1289 # ok(159, $db->get($k, $v, R_CURSOR)) ;
1291 # ok(160, keys %h == 1) ;
1315 ok(154, $a eq "") ;
1335 ok(155, $a eq "") ;
1355 ok(156, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
1362 ok(157, $h{'Alpha_ABC'} == 2);
1363 ok(158, $h{'Alpha_DEF'} == 5);
1367 ok(159, $bad_key == 0);
1371 ok(160, $bad_key == 0);
1375 ok(161, $bad_key == 0);
1387 ok(162, $@ =~ /^Key 'compare' not associated with a code reference at/);
1390 ok(163, $@ =~ /^Key 'prefix' not associated with a code reference at/);
1404 # ok(164, tie(%hash, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $dbh ) );
1410 # ok(165, $@ =~ /^DB_File btree_compare: recursion detected/);
1417 ok(164,1);
1418 ok(165,1);
1436 ok(166, tie(%hash1, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $dbh1 ) );
1437 ok(167, tie(%hash2, 'DB_File',$Dfile2, O_RDWR|O_CREAT, 0640, $dbh2 ) );
1447 ok(168, $h1_count > 0);
1448 ok(169, $h1_count == $h2_count);
1450 ok(170, safeUntie \%hash1);
1451 ok(171, safeUntie \%hash2);
1463 ok(172, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
1473 ok(173, $h{"fred"} eq "joe");
1476 ok (174, ! $@);
1487 ok(175, $h{"fred"} eq "joe");
1489 ok(176, $db->FIRSTKEY() eq "fred") ;
1492 ok (177, ! $@);
1508 ok(178, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ) );
1522 ok 179, $key == 22;
1523 ok 180, $value == 34 ;
1524 ok 181, $_ eq 'fred';
1529 ok 182, $key == 22;
1530 ok 183, $val == 34 ;
1531 ok 184, $_ eq 'fred';
1536 ok 185, $key == 51;
1537 ok 186, $value == 454 ;
1538 ok 187, $_ eq 'fred';
1561 ok(188, $db = tie(%h, 'DB_File', $Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE ));
1576 ok 189, $warned eq ''
1589 ok 190, $warned eq ''
1603 ok 191, $warned eq ''
1617 ok 192, $warned eq ''
1636 ok 193, keys %bad == 0 ;
1637 ok 194, keys %remember == 0 ;
1647 ok 195, $warned eq ''
1655 ok 196, $no_NULL || $value eq 'fred' or print "# got [$value]\n" ;
1656 ok 197, $warned eq ''