develooper Front page | perl.perl5.porters | Postings from April 2007

Re: [PATCH] Allow testing of DBM_Filter with any *DBM_File

Thread Previous
From:
Andy Dougherty
Date:
April 4, 2007 09:39
Subject:
Re: [PATCH] Allow testing of DBM_Filter with any *DBM_File
Message ID:
Pine.LNX.4.62.0704041221590.11599@fractal.phys.lafayette.edu
On Mon, 2 Apr 2007, Jerry D. Hedden wrote:

> Jerry D. Hedden wrote:
> > The test suite for DBM_Filter is hard-coded to use
> > SDBM_File, and hence fails if SDBM_File is not built.
> > That attached patch lets testing proceed by using any
> > *DBM_File (or DB_File) that is found.
> 
> Andy Dougherty wrote:
> > Would this work if you just used AnyDBM_File instead of
> > SDBM_File?
> 
> My patch works, but when I tried replacing instances of
> SDBM_File with AnyDBM_File, I got errors:

Odd.  I'd have thought that this is the sort of thing you're supposed to 
be able to use AnyDBM_File for.  I've never looked at DBM_Filter, but my 
initial impression is that this is a bug either in DBM_Filter or in 
AnyDBM_File.  I've CC'd Paul to get his opinion. 
 
> > ./perl.exe -Ilib lib/DBM_Filter/t/compress.t 
> 1..23
> ok 1 - use DBM_Filter;
> ok 2 - use AnyDBM_File;
> ok 3 - use Fcntl;
> ok 4 - use Compress::Zlib;
> ok 5 - tied to AnyDBM_File
> ok 6 - StoreData called from lib/DBM_Filter/t/compress.t, line 34
> ok 7 - Store Data is a hash reference
> ok 8 - Storing to tied hash
> ok 9 - VerifyData called from lib/DBM_Filter/t/compress.t, line 45
> ok 10 - Expected data is a hash reference
> ok 11 - Verifying a tied hash
> ok 12 - Expected == Actual
> Use of uninitialized value in string ne at lib/DBM_Filter.pm line 184.
> ok 13 - push a 'compress' filter
> ok 14 - StoreData called from lib/DBM_Filter/t/compress.t, line 62
> ok 15 - Store Data is a hash reference
> ok 16 - Storing to tied hash
> Use of uninitialized value $Tie::Hash::origDESTROY{"AnyDBM_File"} in
> subroutine entry at lib/DBM_Filter.pm line 219.
>         (in cleanup) Can't use string ("") as a subroutine ref while
> "strict refs" in use at lib/DBM_Filter.pm line 219.
> ok 17 - untie without inner references
> not ok 18 - tied to AnyDBM_File
> #   Failed test 'tied to AnyDBM_File'
> #   at lib/DBM_Filter/t/compress.t line 85.
> ok 19 - VerifyData called from lib/DBM_Filter/t/compress.t, line 87
> ok 20 - Expected data is a hash reference
> not ok 21 - Verifying a tied hash
> #   Failed test 'Verifying a tied hash'
> #   at lib/dbm_filter_util.pl line 33.
> not ok 22 - Expected == Actual
> #   Failed test 'Expected == Actual'
> #   at lib/dbm_filter_util.pl line 48.
> # Expected does not match actual
> #   No Match from Expected:
> #       'Beta' =>       'beta'
> #       'x�c`' =>       'x�c�'
> #       'x�KLJM'' =>    'x�KI5)�'
> #       '22' => '88'
> #       'alpha' =>      'Alpha'
> #       'x�322' =>      'x�311'
> #       'x�310/�' =>    'x�3502�'
> #       '-45' =>        '-88'
> #       'x�' => 'x�'
> #       '1234' =>       '5678'
> #       'fred' =>       'Joe'
> #       '-3' => '-5'
> #       'x�311' =>      'x�322'
> # 
> ok 23 - untie without inner references
> # Looks like you failed 3 tests of 23.
> 
> 
> 
>  
> ____________________________________________________________________________________
> It's here! Your new message!  
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/
> 

-- 
    Andy Dougherty		doughera@lafayette.edu
    Dept. of Physics
    Lafayette College, Easton PA 18042

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About