Skip Menu |

This queue is for tickets about the File-Find-Rule-Type CPAN distribution.

Report information
The Basics
Id: 112031
Status: new
Priority: 0/
Queue: File-Find-Rule-Type

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.05
Fixed in: (no value)



Subject: Random file order
There are many test failures (mostly on linux systems) because of random order of files in the t/02_type.t test. See http://matrix.cpantesters.org/?dist=File-Find-Rule-Type%200.05 for an overview.
On 2016-02-15 01:28:44, SREZIC wrote: Show quoted text
> There are many test failures (mostly on linux systems) because of > random order of files in the t/02_type.t test. See > http://matrix.cpantesters.org/?dist=File-Find-Rule-Type%200.05 for an > overview.
Attached a possible fix.
Subject: 0001-fix-RT-112031-files-may-be-in-random-order.patch
From 7b98c8d724cc95b2428a12ad925d64c6c3496d6a Mon Sep 17 00:00:00 2001 From: Slaven Rezic <slaven@rezic.de> Date: Mon, 15 Feb 2016 06:29:06 +0000 Subject: [PATCH] fix RT #112031 (files may be in random order) --- t/02_type.t | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/t/02_type.t b/t/02_type.t index 2956973..73394be 100644 --- a/t/02_type.t +++ b/t/02_type.t @@ -5,22 +5,25 @@ use lib './lib','../lib'; use Test::More tests => 4; use File::Find::Rule::Type; -is_deeply( [ find( type => 'image/*', maxdepth => 2, in => 't' ) ], - [ + +sub set { +{ map {($_=>1)} @_ } } + +is_deeply( set(find( type => 'image/*', maxdepth => 2, in => 't' )), + set( 't/happy-baby.JPG', 't/files/blank.bmp', 't/files/blank.gif', 't/files/blank.jpg', 't/files/blank.png', 't/files/blank.tif', - ] ); + ) ); -is_deeply ( [ find( type => '*/*zip*', maxdepth => 2, in => 't' ) ], - [ +is_deeply ( set(find( type => '*/*zip*', maxdepth => 2, in => 't' )), + set( 't/files/blank.zip', 't/files/tarball.tar.bz2', 't/files/tarball.tar.gz', - ] ); + ) ); is_deeply ( [ find( type => 'audio/x-wav', maxdepth => 2, in => 't/files' ) ], [ 't/files/rebound.wav' ] ); -- 1.7.10.4