[Affelio-cvs 2] CVS update: affelio/tests/MLDBM-2.01/t

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 14日 (火) 15:22:47 JST


Index: affelio/tests/MLDBM-2.01/t/compare.t
diff -u affelio/tests/MLDBM-2.01/t/compare.t:1.1.1.1 affelio/tests/MLDBM-2.01/t/compare.t:removed
--- affelio/tests/MLDBM-2.01/t/compare.t:1.1.1.1	Tue Jun 14 12:53:30 2005
+++ affelio/tests/MLDBM-2.01/t/compare.t	Tue Jun 14 15:22:47 2005
@@ -1,45 +0,0 @@
-
-use MLDBM;
-
-my $c = 'c';
-my $d = 'd';
-my $data = { a => 1, b => [0,1], c => \$c };
-$data->{recurse} = $data;
-
-my $err_array = { a => 1, b => [0,2], c => \$c };
-$err_array->{recurse} = $err_array;
-
-my $err_hash = { a => 2, b => [0,1], c => \$c };
-$err_hash->{recurse} = $err_hash;
-
-my $err_scalar = { a => 1, b => [0,1], c => \$d };
-$err_scalar->{recurse} = $err_scalar;
-
-my $err_recurse = { a => 1, b => [0,1], c => \$c };
-$err_recurse->{recurse} = {};
-
-print "1..6\n";
-
-for ($err_array, $err_hash, $err_scalar, $err_recurse) {
-    if(! &MLDBM::_compare($data, $_)) {
-	print "ok\n";
-    } else {
-	print "not ok\n";
-    }
-}
-
-my $data_ok = { a => 1, b => [0,1], c => \$c };
-$data_ok->{recurse} = $data;
-
-for ($data, $data_ok) {
-    if(&MLDBM::_compare($data, $_)) {
-	print "ok\n";
-    } else {
-	print "not ok\n";
-    }
-}
-
-
-
-
-
Index: affelio/tests/MLDBM-2.01/t/dumper.t
diff -u affelio/tests/MLDBM-2.01/t/dumper.t:1.1.1.1 affelio/tests/MLDBM-2.01/t/dumper.t:removed
--- affelio/tests/MLDBM-2.01/t/dumper.t:1.1.1.1	Tue Jun 14 12:53:30 2005
+++ affelio/tests/MLDBM-2.01/t/dumper.t	Tue Jun 14 15:22:47 2005
@@ -1,32 +0,0 @@
-#!/usr/bin/perl -w
-use Fcntl;
-use MLDBM;
-use Data::Dumper;
-use MLDBM;
-
-use strict;
-
-tie my %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-print "1..4\n";
-
-my $c_scalar = 'c';
-my $c = [\$c_scalar];
-$b = {};
-$a = [1, $b, $c];
-$b->{a} = $a;
-$b->{b} = $a->[1];
-$b->{c} = $a->[2];
- @ o{qw(a b c)} = ($a, $b, $c);
-$o{d} = "{once upon a time}";
-$o{e} = 1024;
-$o{f} = 1024.1024;
-
-my $struct = [@o{qw(a b c)}];
-my $first_compare = &MLDBM::_compare([ $a, $b, $c ], $struct);
-
-if ($first_compare) { print "ok 1\n" }
-else { print "not ok\n" }
-print ($o{d} eq "{once upon a time}" ? "ok 2\n" : "# |$o{d}|\nnot ok 2\n");
-print ($o{e} == 1024 ? "ok 3\n" : "# |$o{e}|\nnot ok 3\n");
-print ($o{f} eq 1024.1024 ? "ok 4\n" : "# |$o{f}|\nnot ok 4\n");
-
Index: affelio/tests/MLDBM-2.01/t/freezethaw.t
diff -u affelio/tests/MLDBM-2.01/t/freezethaw.t:1.1.1.1 affelio/tests/MLDBM-2.01/t/freezethaw.t:removed
--- affelio/tests/MLDBM-2.01/t/freezethaw.t:1.1.1.1	Tue Jun 14 12:53:30 2005
+++ affelio/tests/MLDBM-2.01/t/freezethaw.t	Tue Jun 14 15:22:47 2005
@@ -1,33 +0,0 @@
-#!/usr/bin/perl -w
-use Fcntl;
-use MLDBM qw(SDBM_File FreezeThaw);
-use Data::Dumper;
-use strict;
-
-eval { require FreezeThaw };
-if ($@) {
-	print "1..0\n";
-	exit 0;
-}
-tie my %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-print "1..4\n";
-
-my $c_scalar = 'c';
-my $c = [\$c_scalar];
-my $b = {};
-my $a = [1, $b, $c];
-$b->{a} = $a;
-$b->{b} = $a->[1];
-$b->{c} = $a->[2];
- @ o{qw(a b c)} = ($a, $b, $c);
-$o{d} = "{once upon a time}";
-$o{e} = 1024;
-$o{f} = 1024.1024;
-
-my $compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c ]);
-if ($compare_ok) { print "ok 1\n" }
-else { print "not ok 1\n" }
-
-print ($o{d} eq "{once upon a time}" ? "ok 2\n" : "# |$o{d}|\nnot ok 2\n");
-print ($o{e} == 1024 ? "ok 3\n" : "# |$o{e}|\nnot ok 3\n");
-print ($o{f} eq 1024.1024 ? "ok 4\n" : "# |$o{f}|\nnot ok 4\n");
Index: affelio/tests/MLDBM-2.01/t/storable.t
diff -u affelio/tests/MLDBM-2.01/t/storable.t:1.1.1.1 affelio/tests/MLDBM-2.01/t/storable.t:removed
--- affelio/tests/MLDBM-2.01/t/storable.t:1.1.1.1	Tue Jun 14 12:53:30 2005
+++ affelio/tests/MLDBM-2.01/t/storable.t	Tue Jun 14 15:22:47 2005
@@ -1,58 +0,0 @@
-#!/usr/bin/perl -w
-use Fcntl;
-use MLDBM qw(SDBM_File Storable);
-use Data::Dumper;
-use strict;
-
-eval { require Storable };
-if ($@) {
-	print "1..0\n";
-	exit 0;
-}
-tie my %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-print "1..8\n";
-
-my $c_scalar = 'c';
-my $c = [\$c_scalar];
-my $b = {};
-my $a = [1, $b, $c];
-$b->{a} = $a;
-$b->{b} = $a->[1];
-$b->{c} = $a->[2];
- @ o{qw(a b c)} = ($a, $b, $c);
-$o{d} = "{once upon a time}";
-$o{e} = 1024;
-$o{f} = 1024.1024;
-
-my $compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c ]);
-if ($compare_ok) { print "ok 1\n" }
-else { print "not ok 1\n" }
-
-print ($o{d} eq "{once upon a time}" ? "ok 2\n" : "# |$o{d}|\nnot ok 2\n");
-print ($o{e} == 1024 ? "ok 3\n" : "# |$o{e}|\nnot ok 3\n");
-print ($o{f} eq 1024.1024 ? "ok 4\n" : "# |$o{f}|\nnot ok 4\n");
-
-# NEW TEST SEQUENCE
-untie %o;
-my $obj = tie %o, 'MLDBM', 'testmldbm', O_CREAT|O_RDWR, 0640 or die $!;
-$obj->DumpMeth('portable');
-
-$c = [\$c_scalar];
-$b = {};
-$a = [1, $b, $c];
-$b->{a} = $a;
-$b->{b} = $a->[1];
-$b->{c} = $a->[2];
- @ o{qw(a b c)} = ($a, $b, $c);
-$o{d} = "{once upon a time}";
-$o{e} = 1024;
-$o{f} = 1024.1024;
-
-$compare_ok = &MLDBM::_compare([ @o{qw(a b c)} ], [ $a, $b, $c]);
-if ($compare_ok) { print "ok 5\n" }
-else { print "not ok 5\n" }
-
-print ($o{d} eq "{once upon a time}" ? "ok 6\n" : "# |$o{d}|\nnot ok 6\n");
-print ($o{e} == 1024 ? "ok 7\n" : "# |$o{e}|\nnot ok 7\n");
-print ($o{f} eq 1024.1024 ? "ok 8\n" : "# |$o{f}|\nnot ok 8\n");
-


Affelio-cvs メーリングリストの案内
Back to archive index