Hi Paul Here are the results of the tests t/../lib/DBM_Filter/t/01error....1..21 ok 1 - use DBM_Filter; ok 2 - use SDBM_File; ok 3 - use Fcntl; ok 4 - tied to SDBM_File ok ok 5 - croak if not parameters passed to Filter_Push ok 6 - croak on unknown class ok 7 - croak on unknown fully qualified class ok 8 - croak if not passing even number or params to Filter_Push # runFilter bad1 ok 9 - croak if none of Filter/Fetch/Store in filter # runFilter bad2 ok 10 - croak if Filter doesn't return hash reference # runFilter bad3 ok 11 - croak if bad keyword returned from Filter # runFilter bad4 ok 12 - croak if not a code reference # runFilter bad5 ok 13 - croak if neither fetch or store is present # runFilter bad6 ok 14 - croak if store is present but fetch isn't # runFilter bad7 ok 15 - croak if fetch is present but store isn't # runFilter bad8 ok 16 - croak if Fetch, Store and Filter # runFilter bad9 ok 17 - croak if Store and Filter # runFilter bad10 ok 18 - croak if Fetch and Filter # runFilter bad11 ok 19 - croak if Fetch but no Store # runFilter bad12 ok 20 - croak if Store but no Fetch ok 21 - untie without inner references ok All tests successful. u=0.14 s=0.04 cu=0.28 cs=0.09 scripts=1 tests=21 t/../lib/DBM_Filter/t/02core....1..189 ok 1 - use DBM_Filter; ok 2 - use SDBM_File; ok 3 - use Fcntl; ok 4 - tied to SDBM_File ok 5 - read eq written ok 6 - read eq written ok 7 - push 'append_A' filter ok 8 - read eq written ok 9 - read eq written ok 10 - read eq written ok 11 - untie without inner references ok 12 - tied to SDBM_File ok 13 - Raw hash is ok ok 14 - untie without inner references ok 15 - tied to SDBM_File ok 16 - read eq written ok 17 - read eq written ok 18 - push 'append_A' filter ok 19 - read eq written ok 20 - read eq written ok 21 - read eq written ok 22 - untie without inner references ok 23 - tied to SDBM_File ok 24 - Raw hash is ok ok 25 - untie without inner references ok 26 - tied to SDBM_File ok 27 - read eq written ok 28 - read eq written ok 29 - push 'append_A' filter ok 30 - read eq written ok 31 - read eq written ok 32 - read eq written ok 33 - untie without inner references ok 34 - tied to SDBM_File ok 35 - Raw hash is ok ok 36 - untie without inner references ok 37 - tied to SDBM_File ok 38 - read eq written ok 39 - read eq written ok 40 - push 'append_A' filter ok 41 - push 'append_B' filter ok 42 - read eq written ok 43 - read eq written ok 44 - read eq written ok 45 - untie without inner references ok 46 - tied to SDBM_File ok 47 - Raw hash is ok ok 48 - untie without inner references ok 49 - tied to SDBM_File ok 50 - read eq written ok 51 - read eq written ok 52 - push 'append_A' filter ok 53 - push 'append_B' filter ok 54 - push 'append_C' filter ok 55 - push 'append_D' filter ok 56 - read eq written ok 57 - read eq written ok 58 - read eq written ok 59 - untie without inner references ok 60 - tied to SDBM_File ok 61 - Raw hash is ok ok 62 - untie without inner references ok 63 - tied to SDBM_File ok 64 - read eq written ok 65 - read eq written ok 66 - push 'append_B' filter ok 67 - push 'append_D' filter ok 68 - read eq written ok 69 - read eq written ok 70 - read eq written ok 71 - untie without inner references ok 72 - tied to SDBM_File ok 73 - Raw hash is ok ok 74 - untie without inner references ok 75 - tied to SDBM_File ok 76 - read eq written ok 77 - read eq written ok 78 - push 'append_A' filter ok 79 - push 'append_C' filter ok 80 - read eq written ok 81 - read eq written ok 82 - read eq written ok 83 - untie without inner references ok 84 - tied to SDBM_File ok 85 - Raw hash is ok ok 86 - untie without inner references ok 87 - tied to SDBM_File ok 88 - read eq written ok 89 - read eq written ok 90 - push 'append_A' filter ok 91 - push 'append_C' filter ok 92 - push 'append_D' filter ok 93 - read eq written ok 94 - read eq written ok 95 - read eq written ok 96 - untie without inner references ok 97 - tied to SDBM_File ok 98 - Raw hash is ok ok 99 - untie without inner references ok 100 - tied to SDBM_File ok 101 - read eq written ok 102 - read eq written ok 103 - push 'append_A' filter ok 104 - push 'append_B' filter ok 105 - push 'append_C' filter ok 106 - read eq written ok 107 - read eq written ok 108 - read eq written ok 109 - untie without inner references ok 110 - tied to SDBM_File ok 111 - Raw hash is ok ok 112 - untie without inner references ok 113 - tied to SDBM_File ok 114 - read eq written ok 115 - read eq written ok 116 - push 'append_A' filter ok 117 - push 'append_B' filter ok 118 - push 'append_C' filter ok 119 - read eq written ok 120 - read eq written ok 121 - read eq written ok 122 - untie without inner references ok 123 - tied to SDBM_File ok 124 - Raw hash is ok ok 125 - untie without inner references ok 126 - tied to SDBM_File ok 127 - read eq written ok 128 - read eq written ok 129 - push 'append_A' filter ok 130 - push 'append_B' filter ok 131 - push 'append_C' filter ok 132 - read eq written ok 133 - read eq written ok 134 - read eq written ok 135 - untie without inner references ok 136 - tied to SDBM_File ok 137 - Raw hash is ok ok 138 - untie without inner references ok 139 - tied to SDBM_File ok 140 - read eq written ok 141 - read eq written ok 142 - push 'append_A' filter ok 143 - push 'append_B' filter ok 144 - push 'append_C' filter ok 145 - read eq written ok 146 - read eq written ok 147 - read eq written ok 148 - untie without inner references ok 149 - tied to SDBM_File ok 150 - Raw hash is ok ok 151 - untie without inner references ok 152 - tied to SDBM_File ok 153 - read eq written ok 154 - read eq written ok 155 - not filtered ok 156 - push 'append_A' filter ok 157 - is filtered ok 158 - push 'append_B' filter ok 159 - is filtered ok 160 - push 'append_C' filter ok 161 - is filtered ok 162 - read eq written ok 163 - read eq written ok 164 - read eq written ok 165 - Filter_Pop ok 166 - is filtered ok 167 - read eq written ok 168 - Filter_Pop ok 169 - is filtered ok 170 - read eq written ok 171 - Filter_Pop ok 172 - not filtered ok 173 - read eq written ok 174 - Filter_Pop ok 175 - untie without inner references ok 176 - tied to SDBM_File ok 177 - Raw hash is ok ok 178 - untie without inner references ok 179 - tied to SDBM_File ok 180 - read eq written ok 181 - read eq written ok 182 - push 'append_X' filter ok 183 - read eq written ok 184 - read eq written ok 185 - read eq written ok 186 - untie without inner references ok 187 - tied to SDBM_File ok 188 - Raw hash is ok ok 189 - untie without inner references ok All tests successful. u=0.15 s=0.05 cu=0.39 cs=0.13 scripts=1 tests=189 t/../lib/DBM_Filter/t/compress....1..0 # Skip: Compress::Zlib is not available # Can't locate Compress/Zlib.pm in @INC (@INC contains: ../lib) at ../lib/DBM_Filter/t/compress.t line 8. skipping test on this platform All tests successful. u=0.13 s=0.04 cu=0.06 cs=0.02 scripts=0 tests=0 t/../lib/DBM_Filter/t/int32....1..22 ok 1 - use DBM_Filter; ok 2 - use SDBM_File; ok 3 - use Fcntl; ok 4 - tied to SDBM_File ok 5 - StoreData called from ../lib/DBM_Filter/t/int32.t, line 24 ok 6 - Store Data is a hash reference ok 7 - Storing to tied hash ok 8 - VerifyData called from ../lib/DBM_Filter/t/int32.t, line 32 ok 9 - Expected data is a hash reference ok 10 - Verifying a tied hash ok 11 - Expected == Actual ok 12 - push an 'int32' filter ok 13 - StoreData called from ../lib/DBM_Filter/t/int32.t, line 46 ok 14 - Store Data is a hash reference ok 15 - Storing to tied hash ok 16 - untie without inner references ok 17 - tied to SDBM_File ok 18 - VerifyData called from ../lib/DBM_Filter/t/int32.t, line 70 ok 19 - Expected data is a hash reference ok 20 - Verifying a tied hash ok 21 - Expected == Actual ok 22 - untie without inner references ok All tests successful. u=0.14 s=0.04 cu=0.22 cs=0.07 scripts=1 tests=22 t/../lib/DBM_Filter/t/null....1..26 ok 1 - use DBM_Filter; ok 2 - use SDBM_File; ok 3 - use Fcntl; ok 4 - tied to SDBM_File ok 5 - StoreData called from ../lib/DBM_Filter/t/null.t, line 24 ok 6 - Store Data is a hash reference ok 7 - Storing to tied hash ok 8 - VerifyData called from ../lib/DBM_Filter/t/null.t, line 29 ok 9 - Expected data is a hash reference ok 10 - Verifying a tied hash ok 11 - Expected == Actual ok 12 - push a 'null' filter ok 13 - StoreData called from ../lib/DBM_Filter/t/null.t, line 40 ok 14 - Store Data is a hash reference ok 15 - Storing to tied hash ok 16 - VerifyData called from ../lib/DBM_Filter/t/null.t, line 46 ok 17 - Expected data is a hash reference ok 18 - Verifying a tied hash ok 19 - Expected == Actual ok 20 - untie without inner references ok 21 - tied to SDBM_File ok 22 - VerifyData called from ../lib/DBM_Filter/t/null.t, line 73 ok 23 - Expected data is a hash reference ok 24 - Verifying a tied hash ok 25 - Expected == Actual ok 26 - untie without inner references ok All tests successful. u=0.14 s=0.04 cu=0.22 cs=0.07 scripts=1 tests=26 t/../lib/DBM_Filter/t/utf8...._ebcdic_coder: Encode::XS=SCALAR(0x20f0454c)1..20 ok 1 - use DBM_Filter; ok 2 - use SDBM_File; ok 3 - use Fcntl; ok 4 - use charnames; ok 5 - tied to SDBM_File ok 6 - push a 'utf8' filter ok 7 - StoreData called from ../lib/DBM_Filter/t/utf8.t, line 41 ok 8 - Store Data is a hash reference ok 9 - Storing to tied hash ok 10 - VerifyData called from ../lib/DBM_Filter/t/utf8.t, line 51 ok 11 - Expected data is a hash reference ok 12 - Verifying a tied hash ok 15 - tied to SDBM_File ok 16 - VerifyData called from ../lib/DBM_Filter/t/utf8.t, line 72 ok 17 - Expected data is a hash reference ok 18 - Verifying a tied hash not ok 19 - Expected == Actual # Failed test (../lib/dbm_filter_util.pl at line 48) # Expected does not match actual # No Match from Expected: # 'beta' => 'ìý' # 'ì·' => 'gamma' # 'alpha' => 'ì¶' # # No Match from Actual: # 'beta' => '¸ž' # 'alpha' => '¸¨' # '¸ß' => 'gamma' # CEE5213S The signal SIGPIPE was received. FAILED at test 19 possibly due to extra output Failed 1 test script out of 0, 0.00% okay. ### Since not all tests were successful, you may want to run some of ### them individually and examine any diagnostic messages they produce. ### See the INSTALL document's section on "make test". u=0.16 s=0.05 cu=1.29 cs=0.43 scripts=0 tests=0 t/../lib/DBM_Filter/t...FAILED at test 0 Failed 1 test script out of 0, 0.00% okay. ### Since not all tests were successful, you may want to run some of ### them individually and examine any diagnostic messages they produce. ### See the INSTALL document's section on "make test". u=0.16 s=0.05 cu=0.03 cs=0.01 scripts=0 tests=0
Seems like Filter gets pushed properly in the DBM_Filter ,but I suspect that when the StoreData() procedure is called, it stores properly but while verifying the same using VerifyData() it gets a strange value. regards Sastry On 9/12/05, Paul Marquess <[EMAIL PROTECTED]> wrote: > > Thanks, that ouput looks a bit strange. Can you get me the results from > all the DBM_Filter tests please? I need to see if the problems you are > getting are encoding specific or if the other filters have the same problem. > > On Unix this will do the trick > > ./TEST -v ../lib/DBM_Filter/t/01error.t > > ./TEST -v ../lib/DBM_Filter/t/02core.t > > ./TEST -v ../lib/DBM_Filter/t/compress.t > > ./TEST -v ../lib/DBM_Filter/t/int32.t > > ./TEST -v ../lib/DBM_Filter/t/null.t > > ./TEST -v ../lib/DBM_Filter/t/utf8.t > > ./TEST -v ../lib/DBM_Filter/t/ > > cheers > > Paul > > ------------------------------ > > *From:* Sastry [mailto:[EMAIL PROTECTED] > *Sent:* 12 September 2005 06:28 > *To:* [EMAIL PROTECTED]; Dan Kogai > *Cc:* Perl Porters 5 > *Subject:* Re: Encode on EBCDIC patch( Doesn't Work) > > > Hi Paul > > Here is the verbose output of the test > > ok 1 - use DBM_Filter; > ok 2 - use SDBM_File; > ok 3 - use Fcntl; > ok 4 - use charnames; > ok 5 - tied to SDBM_File > ok 6 - push an illigal filter > ok 7 - push an 'encode' filter (default to utf-8) > ok 8 - StoreData called from lib/DBM_Filter/t/encode.t, line 47 > ok 9 - Store Data is a hash reference > ok 10 - Storing to tied hash > ok 11 - VerifyData called from lib/DBM_Filter/t/encode.t, line 57 > ok 12 - Expected data is a hash reference > ok 13 - Verifying a tied hash > not ok 14 - Expected == Actual > # Failed test (/u/isldev3/perl-5.8.6/lib/dbm_filter_util.pl at line 48) > Wide character in print at /u/isldev3/perl-5.8.6/lib/Test/Builder.pm line > 910. > # Expected does not match actual > # No Match from Expected: > # 'beta' => '(c)ß' > # 'alpha' => '(c)ì' > # '(c)Â' => 'gamma' > # > ok 15 - pop the 'utf8' filter > ok 16 - push an 'encode' filter (specify iso-8859-16) > ok 17 - StoreData called from lib/DBM_Filter/t/encode.t, line 72 > ok 18 - Store Data is a hash reference > ok 19 - Storing to tied hash > ok 20 - untie without inner references > ok 21 - tied to SDBM_File > ok 22 - VerifyData called from lib/DBM_Filter/t/encode.t, line 90 > ok 23 - Expected data is a hash reference > ok 24 - Verifying a tied hash > not ok 25 - Expected == Actual > # Failed test (/u/isldev3/perl-5.8.6/lib/dbm_filter_util.pl at line 48) > # Expected does not match actual > # No Match from Expected: > # 'beta' => 'ó¥' > # 'ó·' => 'gamma' > # 'alpha' => 'ó£' > # 'euro' => 'u' > # > # No Match from Actual: > # '/Ä>,' => 'u' > # 'ea' => '(c)ß' > # '(c)Â' => 'am' > # 'lh' => '(c)ì' > # > ok 26 - untie without inner references > # Looks like you failed 2 tests of 26. > > > On 9/9/05, *Paul Marquess* <[EMAIL PROTECTED]> wrote: > > Are you saying that the 4 byte string "euro"(ASCII hex 65 75 72 6F) is > being > stored as '/Ä>,' (hex 2F C4 3E 2C) ? > > The value I am getting on EBCDIC is \x61\x63\x6E\x6B which has no > relation to iso-8859-16 codepoints! Do you have any thoughts as why this is > happening? > > > Can you post the verbose output from running the > lib/DBM_Filter/t/encode.t > test harness please? > > See the output above > > Not sure how different EBDCIC platforms are from Unix-land, but this > is how > you would run it on a Linux/Unix box. > > Running the test is similar > > $ cd t > $ ./TEST -v ../lib/DBM_Filter/t/encode.t > > Paul > > > -----Original Message----- > > From: Sastry [mailto: [EMAIL PROTECTED] > > Sent: 08 September 2005 14:15 > > To: Dan Kogai > > Cc: Perl Porters 5 > > Subject: Re: Encode on EBCDIC patch( Doesn't Work) > > > > Hi Dan > > The patch you had provided calls > > $_ebcdic_coder->decode($str); > > and subsequenly calls my $octets = $enc->encode($string,$check); > > Do you think it is how it is supposed to call on EBCDIC platform? Seems > > like this is a work around > > But there is another test case(lib/DBM_Filter/t/encode.t) in the test > > suite > > that fails because of this encoding module > > Here is the snippet of that test case > > eval { $db1->Filter_Push('encode' => 'iso-8859-16') }; > > is $@, '', "push an 'encode' filter (specify iso-8859-16)" ; > > use charnames qw{:full}; > > StoreData(\%h1, > > { > > 'euro' => "\N{EURO SIGN}", > > }); > > > > VerifyData(\%h2, > > { > > 'euro' => "\xA4", > > > > }); > > The 'euro' gets stored as /Ä>, > > instead of the 'euro' itself. > > Please check if there is a work round for this too or any pointers in > the > > source code where there could be a fix for it! > > -Sastry > > > > > > On 8/24/05, Dan Kogai <[EMAIL PROTECTED]> wrote: > > > > > > Sastry and EBCDIC porters, > > > > > > On Aug 24, 2005, at 21:30 , Dan Kogai wrote: > > > > + sub _utf8_ebcdic($){ > > > > + my $str = shift; # UTF-8 > > > > + $str = # UTF-EBCDIC > > > > + $_ebcdic_coder->encode($str); > > > > + _utf8_on($str); # Dirty Trick > > > > + return $str; > > > > > > I'm not sure if this part works as advertised. The yet another patch > > > below tries the different approach. > > > The problem is that I know so little of UTF-EBCDIC and its > > > implementation. I feel like building a ship in the bottle in the > > > dark.... > > > > > > Dan the Encode Maintainer > > > > > > =================================================================== > > > RCS file: Encode.pm <http://encode.pm/> > > > <http://Encode.pm<http://encode.pm/> > >,v > > > retrieving revision 2.11 > > > diff -u -r2.11 Encode.pm <http://encode.pm/> > > > <http://Encode.pm<http://encode.pm/> > > > > > --- Encode.pm <http://encode.pm/> <http://Encode.pm > <http://encode.pm/>> 2005/08/05 10:58:25 2.11 > > > +++ Encode.pm <http://encode.pm/> <http://Encode.pm<http://encode.pm/>> > 2005/08/24 12:49:18 > > > @@ -136,6 +136,27 @@ > > > return Storable::dclone($obj); > > > } > > > +sub _ebcdic_utf8($); > > > +sub _utf8_ebcdic($); > > > + > > > +if ($ON_EBCDIC){ > > > + my %WHICH_EBCDIC = ( 176 => 'cp37', 95 => 'cp1047', 106 => > > > 'posix-bc' ); > > > + my $_ebcdic_coder = find_encoding($WHICH_EBCDIC{ord "^"}); > > > + sub _ebcdic_utf8($){ > > > + my $str = shift; # UTF-EBCDIC > > > + _utf8_off($str); # Dirty Trick > > > + return # UTF-8 > > > + $_ebcdic_coder->decode($str); > > > + } > > > + sub _utf8_ebcdic($){ > > > + my $str = shift; # UTF-8 > > > + $str = # EBCDIC > > > + $_ebcdic_coder->encode($str); > > > + return # UTF-EBCDIC; > > > + find_encoding("Unicode")->decode($str); > > > + } > > > +} > > > + > > > sub encode($$;$) > > > { > > > my ($name, $string, $check) = @_; > > > @@ -147,8 +168,12 @@ > > > require Carp; > > > Carp::croak("Unknown encoding '$name'"); > > > } > > > + $string = _ebcdic_utf8($string) if $ON_EBCDIC; > > > my $octets = $enc->encode($string,$check); > > > - $_[1] = $string if $check and !($check & LEAVE_SRC()); > > > + if ($check and !($check & LEAVE_SRC()) ){ > > > + $string = _utf8_ebcdic($string); > > > + $_[1] = $string; > > > + } > > > return $octets; > > > } > > > @@ -164,6 +189,7 @@ > > > Carp::croak("Unknown encoding '$name'"); > > > } > > > my $string = $enc->decode($octets,$check); > > > + $string = _utf8_ebcdic($string) if $ON_EBCDIC; > > > $_[1] = $octets if $check and !($check & LEAVE_SRC()); > > > return $string; > > > } > > > > > > > > > > ___________________________________________________________ > To help you stay safe and secure online, we've developed the all new > Yahoo! Security Centre. http://uk.security.yahoo.com > >