On Sun Dec 03 07:04:27 2006, ISHIGAKI wrote:
Show quoted text> t\1.0-generate.t and t\2.0-generate.t fail on Win32 due to the lack
of
Show quoted text> 'binmode' while saving files. Attached patch would fix these.
>
Hi!
I don't like this because RSS is text and should be outputted as such.
Attached is a better patch that resolves it in a better way. Instead
of comparing the size of the file (in bytes) to the length of the
string (in characters), slurp the file and "eq" its contents to the
string.
Here is my commit message for potential reuse:
<<<<<<<<<<
Made the -generate.t tests more robust - instead of checking for
the file size, compare the contents of the file to the as_string()
return
value. That way LF/CRLF conversions and other such incompatibilities
in
calculating file size vs. string length can be mitigated.
Show quoted textAsk, please apply it.
Regards,
Shlomi Fish
Show quoted text> ---------------
> C:\perl\perl5.8.4\.cpan\build\XML-RSS-1.20>nmake test
>
> Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
> Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
>
> C:\perl\perl5.8.4\bin\perl.exe "-MTest::Manifest" "-
> e" "run_t_manifest(0, 'blib\lib', 'blib\arch', )"
> Level is
> Test::Manifest::test_harness found [t\load.t t\pod.t t\version.t
> t\encoding.t t\0.9-generate.t t\0.9-parse.t t\0.91-parse.t t\1.0-
> generate.t t\1.0-parse.t t\1.0-parse-exotic.t t\2.0-generate.t
t\2.0-
Show quoted text> permalink.t t\2.0-parse.t t\2.0-wo-title.t t\1.0-to-2.0.t
> t\auto_add_modules.t t\enclosures.t t\enclosures2.t
t\encode-output.t
Show quoted text> t\items-are-0.t t\rss2-gt-encoding.t t\charset1.t]
> t\load................ok
> t\pod.................ok
> t\version.............ok
> t\encoding............ok
> t\0.9-generate........ok
> t\0.9-parse...........ok
> t\0.91-parse..........ok
> t\1.0-generate........ok 1/22
> t\1.0-generate........NOK 13/22# Failed
test './t/1.0-generated.xml
Show quoted text> has '1448' characters.'
> # in t\1.0-generate.t at line 100.
> # got: 1448
> # expected: 1402
> # Looks like you failed 1 test of 22.
> t\1.0-generate........dubious
> Test returned status 1 (wstat 256, 0x100)
> DIED. FAILED test 13
> Failed 1/22 tests, 95.45% okay
> t\1.0-parse...........ok
> t\1.0-parse-exotic....ok
> t\2.0-generate........NOK 14/26
> # Failed test 't/2.0-generated.xml has '1561' characters.'
> # in t\2.0-generate.t at line 103.
> # got: '1561'
> # expected: '1513'
> # Looks like you failed 1 test of 26.
> t\2.0-generate........dubious
> Test returned status 1 (wstat 256, 0x100)
> DIED. FAILED test 14
> Failed 1/26 tests, 96.15% okay
> t\2.0-permalink.......ok
> t\2.0-parse...........ok
> t\2.0-wo-title........ok
> t\1.0-to-2.0..........ok
> t\auto_add_modules....ok
> t\enclosures..........ok
> t\enclosures2.........ok
> t\encode-output.......ok
> t\items-are-0.........ok
> t\rss2-gt-encoding....ok
> t\charset1............ok
> Failed Test Stat Wstat Total Fail List of Failed
> ------------------------------------------------------------------------
> -------
> t\1.0-generate.t 1 256 22 1 13
> t\2.0-generate.t 1 256 26 1 14
> Failed 2/22 test scripts. 2/222 subtests failed.
> Files=22, Tests=222, 58 wallclock secs ( 0.00 cusr + 0.00 csys =
0.00
Show quoted text> CPU)
> Failed 2/22 test programs. 2/222 subtests failed.
> # Looks like your test died before it could output anything.
> NMAKE : fatal error U1077: 'C:\perl\perl5.8.4\bin\perl.exe' : リターン コー
ド
Show quoted text> '0xff'
> Stop.