Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 364501 - <dev-perl/File-MimeInfo-0.160.0 fails tests Perl 5.14
Summary: <dev-perl/File-MimeInfo-0.160.0 fails tests Perl 5.14
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL: https://rt.cpan.org/Ticket/Display.ht...
Whiteboard:
Keywords:
Depends on:
Blocks: perl-5.14.0
  Show dependency tree
 
Reported: 2011-04-22 16:28 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2012-02-26 19:19 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
File-MimeInfo test log (dev-perl_File-MimeInfo-0.15-r1,4.79 KB, text/plain)
2011-04-22 16:28 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details
Suggested solution for RT#66841 (0001-Suggested-fix-for-RT-66841.patch,1.66 KB, patch)
2011-05-06 22:03 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2011-04-22 16:28:27 UTC
Created attachment 270887 [details]
File-MimeInfo test log

Broken due to tests and the change in representation of stringified regular expressions. 

Test log attached.
Comment 1 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2011-05-06 22:03:07 UTC
Created attachment 272321 [details, diff]
Suggested solution for RT#66841

The attached patch should permit tests to pass on newer perls, as well as retaining backwards compatibility with older perls.
Comment 2 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2011-05-06 22:17:56 UTC
Also fixed in Git overlay for the impatient.

http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=03a3a919553f7a7ab1c32fa24fd6b1a480817fca
Comment 3 Ooblick 2012-02-26 16:04:58 UTC
This seems to be fixed in File-MimeInfo-0.16, which is the current version in the tree. Using perl-5.14.2 with File-MimeInfo-0.15 I get:

/tmp/perl5/bin/perl Build --makefile_env_macros 1 test
t/00_use_ok.t ...... ok   
t/01_normal.t ...... 1/30 
#   Failed test 'glob 1'
#   at t/01_normal.t line 26.
#          got: '(?^u:^.*\.pl$)'
#     expected: '(?-xism:^.*\.pl$)'

#   Failed test 'glob 2'
#   at t/01_normal.t line 26.
#          got: '(?^u:^.*\.h\+\+$)'
#     expected: '(?-xism:^.*\.h\+\+$)'

#   Failed test 'glob 3'
#   at t/01_normal.t line 26.
#          got: '(?^u:^.*\.[tar]\..*$)'
#     expected: '(?-xism:^.*\.[tar]\..*$)'

#   Failed test 'glob 4'
#   at t/01_normal.t line 26.
#          got: '(?^u:^.*\..?$)'
#     expected: '(?-xism:^.*\..?$)'
# Looks like you failed 4 tests of 30.
t/01_normal.t ...... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/30 subtests 

With File-MimeInfo-0.16 (in the tree) the regexes have been fixed:

/tmp/perl5/bin/perl Build --makefile_env_macros 1 test
t/00_use_ok.t ...... ok   
t/01_normal.t ...... ok     
t/02_magic.t ....... ok     
t/03_rox.t ......... ok   
t/04_IO_objects.t .. ok   
t/05_more.t ........ ok     
t/06_pod_ok.t ...... skipped: Test::Pod 1.00 required for testing POD
t/07_pod_cover.t ... skipped: Test::Pod::Coverage 1.00 required for testing POD coverage
All tests successful.
Files=8, Tests=67,  0 wallclock secs ( 0.04 usr  0.01 sys +  0.21 cusr  0.04 csys =  0.30 CPU)
Result: PASS
/tmp/perl5/bin/perl Build --makefile_env_macros 1 test
t/00_use_ok.t ...... ok   
t/01_normal.t ...... ok     
t/02_magic.t ....... ok     
t/03_rox.t ......... ok   
t/04_IO_objects.t .. ok   
t/05_more.t ........ ok     
t/06_pod_ok.t ...... skipped: Test::Pod 1.00 required for testing POD
t/07_pod_cover.t ... skipped: Test::Pod::Coverage 1.00 required for testing POD coverage
All tests successful.
Files=8, Tests=67,  0 wallclock secs ( 0.04 usr  0.01 sys +  0.21 cusr  0.04 csys =  0.30 CPU)
Result: PASS

I think this bug can be closed.
Comment 4 Ooblick 2012-02-26 16:05:58 UTC
Whoops - seem to have pasted the File-MimeInfo-0.16 test output twice. The output is actually:

/tmp/perl5/bin/perl Build --makefile_env_macros 1 test
t/00_use_ok.t ...... ok   
t/01_normal.t ...... ok     
t/02_magic.t ....... ok     
t/03_rox.t ......... ok   
t/04_IO_objects.t .. ok   
t/05_more.t ........ ok     
t/06_pod_ok.t ...... skipped: Test::Pod 1.00 required for testing POD
t/07_pod_cover.t ... skipped: Test::Pod::Coverage 1.00 required for testing POD coverage
All tests successful.
Files=8, Tests=67,  0 wallclock secs ( 0.04 usr  0.01 sys +  0.21 cusr  0.04 csys =  0.30 CPU)
Result: PASS
Comment 5 Torsten Veller (RETIRED) gentoo-dev 2012-02-26 19:19:47 UTC
Closing