Re: [PATCH: perl@8342] comp/proto..........FAILED tests 112-123
[p5sagit/p5-mst-13.2.git] / t / lib / ndbm.t
index 39c3f40..a834444 100755 (executable)
@@ -4,7 +4,7 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    @INC = '../lib';
     require Config; import Config;
     if ($Config{'extensions'} !~ /\bNDBM_File\b/) {
        print "1..0 # Skip: NDBM_File was not built\n";
@@ -16,7 +16,7 @@ require NDBM_File;
 #If Fcntl is not available, try 0x202 or 0x102 for O_RDWR|O_CREAT
 use Fcntl;
 
-print "1..64\n";
+print "1..65\n";
 
 unlink <Op.dbmx*>;
 
@@ -391,3 +391,20 @@ EOM
    untie %h;
    unlink <Op.dbmx*>;
 }
+
+{
+    # Bug ID 20001013.009
+    #
+    # test that $hash{KEY} = undef doesn't produce the warning
+    #     Use of uninitialized value in null operation 
+    use warnings ;
+    use strict ;
+    use NDBM_File ;
+
+    unlink <Op.dbmx*>;
+    my %h ;
+    my $a = "";
+    local $SIG{__WARN__} = sub {$a = $_[0]} ;
+    
+    ok(65, tie(%h, 'NDBM_File','Op.dbmx', O_RDWR|O_CREAT, 0640)) ;
+}